! function(e, t) {
	"object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define &&
		define.amd ? define([], t) : "object" == typeof exports ? exports.websdk = t() : e.websdk = t()
}(self, (function() {
	return function() {
		var e = {
				188: function(e, t, r) {
					var o, n, i;
					! function(a) {
						"use strict";
						if (null != t && "number" != typeof t.nodeType) e.exports = a();
						else if (null != r.amdO) n = [], void 0 === (i = "function" == typeof(o = a) ? o
							.apply(t, n) : o) || (e.exports = i);
						else {
							var s = a(),
								c = "undefined" != typeof self ? self : $.global;
							"function" != typeof c.btoa && (c.btoa = s.btoa), "function" != typeof c
								.atob && (c.atob = s.atob)
						}
					}((function() {
						"use strict";
						var e =
							"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

						function t(e) {
							this.message = e
						}
						return t.prototype = new Error, t.prototype.name =
							"InvalidCharacterError", {
								btoa: function(r) {
									for (var o, n, i = String(r), a = 0, s = e, c = ""; i
										.charAt(0 | a) || (s = "=", a % 1); c += s.charAt(
											63 & o >> 8 - a % 1 * 8)) {
										if ((n = i.charCodeAt(a += 3 / 4)) > 255)
										throw new t(
												"'btoa' failed: The string to be encoded contains characters outside of the Latin1 range."
												);
										o = o << 8 | n
									}
									return c
								},
								atob: function(r) {
									var o = String(r).replace(/[=]+$/, "");
									if (o.length % 4 == 1) throw new t(
										"'atob' failed: The string to be decoded is not correctly encoded."
										);
									for (var n, i, a = 0, s = 0, c = ""; i = o.charAt(
										s++); ~i && (n = a % 4 ? 64 * n + i : i, a++ % 4) ?
										c += String.fromCharCode(255 & n >> (-2 * a & 6)) :
										0) i = e.indexOf(i);
									return c
								}
							}
					}))
				},
				720: function(e) {
					e.exports = r;
					var t = null;
					try {
						t = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0, 97, 115,
							109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127,
							127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127,
							1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105,
							118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114,
							101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8,
							103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6,
							4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66,
							32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126,
							34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1,
							126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173,
							32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167,
							36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1,
							173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134,
							132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11,
							36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32,
							2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32,
							135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173,
							32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66,
							32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4,
							167, 11
						])), {}).exports
					} catch (e) {}

					function r(e, t, r) {
						this.low = 0 | e, this.high = 0 | t, this.unsigned = !!r
					}

					function o(e) {
						return !0 === (e && e.__isLong__)
					}
					r.prototype.__isLong__, Object.defineProperty(r.prototype, "__isLong__", {
						value: !0
					}), r.isLong = o;
					var n = {},
						i = {};

					function a(e, t) {
						var r, o, a;
						return t ? (a = 0 <= (e >>>= 0) && e < 256) && (o = i[e]) ? o : (r = c(e, (0 |
							e) < 0 ? -1 : 0, !0), a && (i[e] = r), r) : (a = -128 <= (e |= 0) && e <
							128) && (o = n[e]) ? o : (r = c(e, e < 0 ? -1 : 0, !1), a && (n[e] = r),
							r)
					}

					function s(e, t) {
						if (isNaN(e)) return t ? E : g;
						if (t) {
							if (e < 0) return E;
							if (e >= h) return R
						} else {
							if (e <= -f) return O;
							if (e + 1 >= f) return T
						}
						return e < 0 ? s(-e, t).neg() : c(e % p | 0, e / p | 0, t)
					}

					function c(e, t, o) {
						return new r(e, t, o)
					}
					r.fromInt = a, r.fromNumber = s, r.fromBits = c;
					var l = Math.pow;

					function u(e, t, r) {
						if (0 === e.length) throw Error("empty string");
						if ("NaN" === e || "Infinity" === e || "+Infinity" === e || "-Infinity" === e)
							return g;
						if ("number" == typeof t ? (r = t, t = !1) : t = !!t, (r = r || 10) < 2 || 36 <
							r) throw RangeError("radix");
						var o;
						if ((o = e.indexOf("-")) > 0) throw Error("interior hyphen");
						if (0 === o) return u(e.substring(1), t, r).neg();
						for (var n = s(l(r, 8)), i = g, a = 0; a < e.length; a += 8) {
							var c = Math.min(8, e.length - a),
								d = parseInt(e.substring(a, a + c), r);
							if (c < 8) {
								var p = s(l(r, c));
								i = i.mul(p).add(s(d))
							} else i = (i = i.mul(n)).add(s(d))
						}
						return i.unsigned = t, i
					}

					function d(e, t) {
						return "number" == typeof e ? s(e, t) : "string" == typeof e ? u(e, t) : c(e
							.low, e.high, "boolean" == typeof t ? t : e.unsigned)
					}
					r.fromString = u, r.fromValue = d;
					var p = 4294967296,
						h = p * p,
						f = h / 2,
						m = a(1 << 24),
						g = a(0);
					r.ZERO = g;
					var E = a(0, !0);
					r.UZERO = E;
					var y = a(1);
					r.ONE = y;
					var v = a(1, !0);
					r.UONE = v;
					var _ = a(-1);
					r.NEG_ONE = _;
					var T = c(-1, 2147483647, !1);
					r.MAX_VALUE = T;
					var R = c(-1, -1, !0);
					r.MAX_UNSIGNED_VALUE = R;
					var O = c(0, -2147483648, !1);
					r.MIN_VALUE = O;
					var I = r.prototype;
					I.toInt = function() {
							return this.unsigned ? this.low >>> 0 : this.low
						}, I.toNumber = function() {
							return this.unsigned ? (this.high >>> 0) * p + (this.low >>> 0) : this
								.high * p + (this.low >>> 0)
						}, I.toString = function(e) {
							if ((e = e || 10) < 2 || 36 < e) throw RangeError("radix");
							if (this.isZero()) return "0";
							if (this.isNegative()) {
								if (this.eq(O)) {
									var t = s(e),
										r = this.div(t),
										o = r.mul(t).sub(this);
									return r.toString(e) + o.toInt().toString(e)
								}
								return "-" + this.neg().toString(e)
							}
							for (var n = s(l(e, 6), this.unsigned), i = this, a = "";;) {
								var c = i.div(n),
									u = (i.sub(c.mul(n)).toInt() >>> 0).toString(e);
								if ((i = c).isZero()) return u + a;
								for (; u.length < 6;) u = "0" + u;
								a = "" + u + a
							}
						}, I.getHighBits = function() {
							return this.high
						}, I.getHighBitsUnsigned = function() {
							return this.high >>> 0
						}, I.getLowBits = function() {
							return this.low
						}, I.getLowBitsUnsigned = function() {
							return this.low >>> 0
						}, I.getNumBitsAbs = function() {
							if (this.isNegative()) return this.eq(O) ? 64 : this.neg().getNumBitsAbs();
							for (var e = 0 != this.high ? this.high : this.low, t = 31; t > 0 && 0 == (
									e & 1 << t); t--);
							return 0 != this.high ? t + 33 : t + 1
						}, I.isZero = function() {
							return 0 === this.high && 0 === this.low
						}, I.eqz = I.isZero, I.isNegative = function() {
							return !this.unsigned && this.high < 0
						}, I.isPositive = function() {
							return this.unsigned || this.high >= 0
						}, I.isOdd = function() {
							return 1 == (1 & this.low)
						}, I.isEven = function() {
							return 0 == (1 & this.low)
						}, I.equals = function(e) {
							return o(e) || (e = d(e)), (this.unsigned === e.unsigned || this.high >>>
									31 != 1 || e.high >>> 31 != 1) && this.high === e.high && this
								.low === e.low
						}, I.eq = I.equals, I.notEquals = function(e) {
							return !this.eq(e)
						}, I.neq = I.notEquals, I.ne = I.notEquals, I.lessThan = function(e) {
							return this.comp(e) < 0
						}, I.lt = I.lessThan, I.lessThanOrEqual = function(e) {
							return this.comp(e) <= 0
						}, I.lte = I.lessThanOrEqual, I.le = I.lessThanOrEqual, I.greaterThan =
						function(e) {
							return this.comp(e) > 0
						}, I.gt = I.greaterThan, I.greaterThanOrEqual = function(e) {
							return this.comp(e) >= 0
						}, I.gte = I.greaterThanOrEqual, I.ge = I.greaterThanOrEqual, I.compare =
						function(e) {
							if (o(e) || (e = d(e)), this.eq(e)) return 0;
							var t = this.isNegative(),
								r = e.isNegative();
							return t && !r ? -1 : !t && r ? 1 : this.unsigned ? e.high >>> 0 > this
								.high >>> 0 || e.high === this.high && e.low >>> 0 > this.low >>> 0 ? -
								1 : 1 : this.sub(e).isNegative() ? -1 : 1
						}, I.comp = I.compare, I.negate = function() {
							return !this.unsigned && this.eq(O) ? O : this.not().add(y)
						}, I.neg = I.negate, I.add = function(e) {
							o(e) || (e = d(e));
							var t = this.high >>> 16,
								r = 65535 & this.high,
								n = this.low >>> 16,
								i = 65535 & this.low,
								a = e.high >>> 16,
								s = 65535 & e.high,
								l = e.low >>> 16,
								u = 0,
								p = 0,
								h = 0,
								f = 0;
							return h += (f += i + (65535 & e.low)) >>> 16, p += (h += n + l) >>> 16,
								u += (p += r + s) >>> 16, u += t + a, c((h &= 65535) << 16 | (f &=
									65535), (u &= 65535) << 16 | (p &= 65535), this.unsigned)
						}, I.subtract = function(e) {
							return o(e) || (e = d(e)), this.add(e.neg())
						}, I.sub = I.subtract, I.multiply = function(e) {
							if (this.isZero()) return g;
							if (o(e) || (e = d(e)), t) return c(t.mul(this.low, this.high, e.low, e
								.high), t.get_high(), this.unsigned);
							if (e.isZero()) return g;
							if (this.eq(O)) return e.isOdd() ? O : g;
							if (e.eq(O)) return this.isOdd() ? O : g;
							if (this.isNegative()) return e.isNegative() ? this.neg().mul(e.neg()) :
								this.neg().mul(e).neg();
							if (e.isNegative()) return this.mul(e.neg()).neg();
							if (this.lt(m) && e.lt(m)) return s(this.toNumber() * e.toNumber(), this
								.unsigned);
							var r = this.high >>> 16,
								n = 65535 & this.high,
								i = this.low >>> 16,
								a = 65535 & this.low,
								l = e.high >>> 16,
								u = 65535 & e.high,
								p = e.low >>> 16,
								h = 65535 & e.low,
								f = 0,
								E = 0,
								y = 0,
								v = 0;
							return y += (v += a * h) >>> 16, E += (y += i * h) >>> 16, y &= 65535, E +=
								(y += a * p) >>> 16, f += (E += n * h) >>> 16, E &= 65535, f += (E +=
									i * p) >>> 16, E &= 65535, f += (E += a * u) >>> 16, f += r * h +
								n * p + i * u + a * l, c((y &= 65535) << 16 | (v &= 65535), (f &=
									65535) << 16 | (E &= 65535), this.unsigned)
						}, I.mul = I.multiply, I.divide = function(e) {
							if (o(e) || (e = d(e)), e.isZero()) throw Error("division by zero");
							var r, n, i;
							if (t) return this.unsigned || -2147483648 !== this.high || -1 !== e.low ||
								-1 !== e.high ? c((this.unsigned ? t.div_u : t.div_s)(this.low, this
									.high, e.low, e.high), t.get_high(), this.unsigned) : this;
							if (this.isZero()) return this.unsigned ? E : g;
							if (this.unsigned) {
								if (e.unsigned || (e = e.toUnsigned()), e.gt(this)) return E;
								if (e.gt(this.shru(1))) return v;
								i = E
							} else {
								if (this.eq(O)) return e.eq(y) || e.eq(_) ? O : e.eq(O) ? y : (r = this
									.shr(1).div(e).shl(1)).eq(g) ? e.isNegative() ? y : _ : (n =
									this.sub(e.mul(r)), i = r.add(n.div(e)));
								if (e.eq(O)) return this.unsigned ? E : g;
								if (this.isNegative()) return e.isNegative() ? this.neg().div(e.neg()) :
									this.neg().div(e).neg();
								if (e.isNegative()) return this.div(e.neg()).neg();
								i = g
							}
							for (n = this; n.gte(e);) {
								r = Math.max(1, Math.floor(n.toNumber() / e.toNumber()));
								for (var a = Math.ceil(Math.log(r) / Math.LN2), u = a <= 48 ? 1 : l(2,
										a - 48), p = s(r), h = p.mul(e); h.isNegative() || h.gt(n);) h =
									(p = s(r -= u, this.unsigned)).mul(e);
								p.isZero() && (p = y), i = i.add(p), n = n.sub(h)
							}
							return i
						}, I.div = I.divide, I.modulo = function(e) {
							return o(e) || (e = d(e)), t ? c((this.unsigned ? t.rem_u : t.rem_s)(this
									.low, this.high, e.low, e.high), t.get_high(), this.unsigned) : this
								.sub(this.div(e).mul(e))
						}, I.mod = I.modulo, I.rem = I.modulo, I.not = function() {
							return c(~this.low, ~this.high, this.unsigned)
						}, I.and = function(e) {
							return o(e) || (e = d(e)), c(this.low & e.low, this.high & e.high, this
								.unsigned)
						}, I.or = function(e) {
							return o(e) || (e = d(e)), c(this.low | e.low, this.high | e.high, this
								.unsigned)
						}, I.xor = function(e) {
							return o(e) || (e = d(e)), c(this.low ^ e.low, this.high ^ e.high, this
								.unsigned)
						}, I.shiftLeft = function(e) {
							return o(e) && (e = e.toInt()), 0 == (e &= 63) ? this : e < 32 ? c(this
								.low << e, this.high << e | this.low >>> 32 - e, this.unsigned) : c(
								0, this.low << e - 32, this.unsigned)
						}, I.shl = I.shiftLeft, I.shiftRight = function(e) {
							return o(e) && (e = e.toInt()), 0 == (e &= 63) ? this : e < 32 ? c(this
									.low >>> e | this.high << 32 - e, this.high >> e, this.unsigned) :
								c(this.high >> e - 32, this.high >= 0 ? 0 : -1, this.unsigned)
						}, I.shr = I.shiftRight, I.shiftRightUnsigned = function(e) {
							if (o(e) && (e = e.toInt()), 0 == (e &= 63)) return this;
							var t = this.high;
							return e < 32 ? c(this.low >>> e | t << 32 - e, t >>> e, this.unsigned) : c(
								32 === e ? t : t >>> e - 32, 0, this.unsigned)
						}, I.shru = I.shiftRightUnsigned, I.shr_u = I.shiftRightUnsigned, I.toSigned =
						function() {
							return this.unsigned ? c(this.low, this.high, !1) : this
						}, I.toUnsigned = function() {
							return this.unsigned ? this : c(this.low, this.high, !0)
						}, I.toBytes = function(e) {
							return e ? this.toBytesLE() : this.toBytesBE()
						}, I.toBytesLE = function() {
							var e = this.high,
								t = this.low;
							return [255 & t, t >>> 8 & 255, t >>> 16 & 255, t >>> 24, 255 & e, e >>> 8 &
								255, e >>> 16 & 255, e >>> 24
							]
						}, I.toBytesBE = function() {
							var e = this.high,
								t = this.low;
							return [e >>> 24, e >>> 16 & 255, e >>> 8 & 255, 255 & e, t >>> 24, t >>>
								16 & 255, t >>> 8 & 255, 255 & t
							]
						}, r.fromBytes = function(e, t, o) {
							return o ? r.fromBytesLE(e, t) : r.fromBytesBE(e, t)
						}, r.fromBytesLE = function(e, t) {
							return new r(e[0] | e[1] << 8 | e[2] << 16 | e[3] << 24, e[4] | e[5] << 8 |
								e[6] << 16 | e[7] << 24, t)
						}, r.fromBytesBE = function(e, t) {
							return new r(e[4] << 24 | e[5] << 16 | e[6] << 8 | e[7], e[0] << 24 | e[
								1] << 16 | e[2] << 8 | e[3], t)
						}
				},
				969: function(e) {
					"use strict";

					function t() {
						this._listeners = {}
					}
					e.exports = t, t.prototype.on = function(e, t, r) {
						return (this._listeners[e] || (this._listeners[e] = [])).push({
							fn: t,
							ctx: r || this
						}), this
					}, t.prototype.off = function(e, t) {
						if (void 0 === e) this._listeners = {};
						else if (void 0 === t) this._listeners[e] = [];
						else
							for (var r = this._listeners[e], o = 0; o < r.length;) r[o].fn === t ? r
								.splice(o, 1) : ++o;
						return this
					}, t.prototype.emit = function(e) {
						var t = this._listeners[e];
						if (t) {
							for (var r = [], o = 1; o < arguments.length;) r.push(arguments[o++]);
							for (o = 0; o < t.length;) t[o].fn.apply(t[o++].ctx, r)
						}
						return this
					}
				},
				728: function(e) {
					"use strict";
					e.exports = function(e, t) {
						for (var r = new Array(arguments.length - 1), o = 0, n = 2, i = !0; n <
							arguments.length;) r[o++] = arguments[n++];
						return new Promise((function(n, a) {
							r[o] = function(e) {
								if (i)
									if (i = !1, e) a(e);
									else {
										for (var t = new Array(arguments.length -
												1), r = 0; r < t.length;) t[r++] =
											arguments[r];
										n.apply(null, t)
									}
							};
							try {
								e.apply(t || null, r)
							} catch (e) {
								i && (i = !1, a(e))
							}
						}))
					}
				},
				440: function(e) {
					"use strict";
					var t = e.exports;
					t.length = function(e) {
						var t = e.length;
						if (!t) return 0;
						for (var r = 0; --t % 4 > 1 && "=" === e.charAt(t);) ++r;
						return Math.ceil(3 * e.length) / 4 - r
					};
					for (var r = new Array(64), o = new Array(123), n = 0; n < 64;) o[r[n] = n < 26 ?
						n + 65 : n < 52 ? n + 71 : n < 62 ? n - 4 : n - 59 | 43] = n++;
					t.encode = function(e, t, o) {
						for (var n, i = null, a = [], s = 0, c = 0; t < o;) {
							var l = e[t++];
							switch (c) {
								case 0:
									a[s++] = r[l >> 2], n = (3 & l) << 4, c = 1;
									break;
								case 1:
									a[s++] = r[n | l >> 4], n = (15 & l) << 2, c = 2;
									break;
								case 2:
									a[s++] = r[n | l >> 6], a[s++] = r[63 & l], c = 0
							}
							s > 8191 && ((i || (i = [])).push(String.fromCharCode.apply(String, a)),
								s = 0)
						}
						return c && (a[s++] = r[n], a[s++] = 61, 1 === c && (a[s++] = 61)), i ? (
							s && i.push(String.fromCharCode.apply(String, a.slice(0, s))), i
							.join("")) : String.fromCharCode.apply(String, a.slice(0, s))
					};
					var i = "invalid encoding";
					t.decode = function(e, t, r) {
						for (var n, a = r, s = 0, c = 0; c < e.length;) {
							var l = e.charCodeAt(c++);
							if (61 === l && s > 1) break;
							if (void 0 === (l = o[l])) throw Error(i);
							switch (s) {
								case 0:
									n = l, s = 1;
									break;
								case 1:
									t[r++] = n << 2 | (48 & l) >> 4, n = l, s = 2;
									break;
								case 2:
									t[r++] = (15 & n) << 4 | (60 & l) >> 2, n = l, s = 3;
									break;
								case 3:
									t[r++] = (3 & n) << 6 | l, s = 0
							}
						}
						if (1 === s) throw Error(i);
						return r - a
					}, t.test = function(e) {
						return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/
							.test(e)
					}
				},
				72: function(e) {
					e.exports = o;
					var t, r = /\/|\./;

					function o(e, t) {
						r.test(e) || (e = "google/protobuf/" + e + ".proto", t = {
							nested: {
								google: {
									nested: {
										protobuf: {
											nested: t
										}
									}
								}
							}
						}), o[e] = t
					}
					o("any", {
						Any: {
							fields: {
								type_url: {
									type: "string",
									id: 1
								},
								value: {
									type: "bytes",
									id: 2
								}
							}
						}
					}), o("duration", {
						Duration: t = {
							fields: {
								seconds: {
									type: "int64",
									id: 1
								},
								nanos: {
									type: "int32",
									id: 2
								}
							}
						}
					}), o("timestamp", {
						Timestamp: t
					}), o("empty", {
						Empty: {
							fields: {}
						}
					}), o("struct", {
						Struct: {
							fields: {
								fields: {
									keyType: "string",
									type: "Value",
									id: 1
								}
							}
						},
						Value: {
							oneofs: {
								kind: {
									oneof: ["nullValue", "numberValue", "stringValue",
										"boolValue", "structValue", "listValue"
									]
								}
							},
							fields: {
								nullValue: {
									type: "NullValue",
									id: 1
								},
								numberValue: {
									type: "double",
									id: 2
								},
								stringValue: {
									type: "string",
									id: 3
								},
								boolValue: {
									type: "bool",
									id: 4
								},
								structValue: {
									type: "Struct",
									id: 5
								},
								listValue: {
									type: "ListValue",
									id: 6
								}
							}
						},
						NullValue: {
							values: {
								NULL_VALUE: 0
							}
						},
						ListValue: {
							fields: {
								values: {
									rule: "repeated",
									type: "Value",
									id: 1
								}
							}
						}
					}), o("wrappers", {
						DoubleValue: {
							fields: {
								value: {
									type: "double",
									id: 1
								}
							}
						},
						FloatValue: {
							fields: {
								value: {
									type: "float",
									id: 1
								}
							}
						},
						Int64Value: {
							fields: {
								value: {
									type: "int64",
									id: 1
								}
							}
						},
						UInt64Value: {
							fields: {
								value: {
									type: "uint64",
									id: 1
								}
							}
						},
						Int32Value: {
							fields: {
								value: {
									type: "int32",
									id: 1
								}
							}
						},
						UInt32Value: {
							fields: {
								value: {
									type: "uint32",
									id: 1
								}
							}
						},
						BoolValue: {
							fields: {
								value: {
									type: "bool",
									id: 1
								}
							}
						},
						StringValue: {
							fields: {
								value: {
									type: "string",
									id: 1
								}
							}
						},
						BytesValue: {
							fields: {
								value: {
									type: "bytes",
									id: 1
								}
							}
						}
					}), o("field_mask", {
						FieldMask: {
							fields: {
								paths: {
									rule: "repeated",
									type: "string",
									id: 1
								}
							}
						}
					}), o.get = function(e) {
						return o[e] || null
					}
				},
				525: function(e, t, r) {
					var o, n, i = e.exports;

					function a(e, t, r, i) {
						var a = i.m,
							s = i.d,
							c = i.types,
							l = i.ksi,
							u = void 0 !== l;
						if (e.resolvedType)
							if (e.resolvedType instanceof o) {
								for (var d = u ? s[r][l] : s[r], p = e.resolvedType.values, h = Object
										.keys(p), f = 0; f < h.length; f++)
									if (!(e.repeated && p[h[f]] === e.typeDefault || h[f] != d && p[h[
											f]] != d)) {
										u ? a[r][l] = p[h[f]] : a[r] = p[h[f]];
										break
									}
							} else {
								if ("object" != typeof(u ? s[r][l] : s[r])) throw TypeError(e.fullName +
									": object expected");
								u ? a[r][l] = c[t].fromObject(s[r][l]) : a[r] = c[t].fromObject(s[r])
							}
						else {
							var m = !1;
							switch (e.type) {
								case "double":
								case "float":
									u ? a[r][l] = Number(s[r][l]) : a[r] = Number(s[r]);
									break;
								case "uint32":
								case "fixed32":
									u ? a[r][l] = s[r][l] >>> 0 : a[r] = s[r] >>> 0;
									break;
								case "int32":
								case "sint32":
								case "sfixed32":
									u ? a[r][l] = 0 | s[r][l] : a[r] = 0 | s[r];
									break;
								case "uint64":
									m = !0;
								case "int64":
								case "sint64":
								case "fixed64":
								case "sfixed64":
									n.Long ? u ? a[r][l] = n.Long.fromValue(s[r][l]).unsigned = m : a[
										r] = n.Long.fromValue(s[r]).unsigned = m : "string" == typeof(
											u ? s[r][l] : s[r]) ? u ? a[r][l] = parseInt(s[r][l], 10) :
										a[r] = parseInt(s[r], 10) : "number" == typeof(u ? s[r][l] : s[
											r]) ? u ? a[r][l] = s[r][l] : a[r] = s[r] : "object" ==
										typeof(u ? s[r][l] : s[r]) && (u ? a[r][l] = new n.LongBits(s[r]
												[l].low >>> 0, s[r][l].high >>> 0).toNumber(m) : a[r] =
											new n.LongBits(s[r].low >>> 0, s[r].high >>> 0).toNumber(m)
											);
									break;
								case "bytes":
									"string" == typeof(u ? s[r][l] : s[r]) ? u ? n.base64.decode(s[r][
											l], a[r][l] = n.newBuffer(n.base64.length(s[r][l])), 0) : n
										.base64.decode(s[r], a[r] = n.newBuffer(n.base64.length(s[r])),
											0): (u ? s[r][l] : s[r]).length && (u ? a[r][l] = s[r][l] :
											a[r] = s[r]);
									break;
								case "string":
									u ? a[r][l] = String(s[r][l]) : a[r] = String(s[r]);
									break;
								case "bool":
									u ? a[r][l] = Boolean(s[r][l]) : a[r] = Boolean(s[r])
							}
						}
					}

					function s(e, t, r, i) {
						var a = i.m,
							s = i.d,
							c = i.types,
							l = i.ksi,
							u = i.o,
							d = void 0 !== l;
						if (e.resolvedType) e.resolvedType instanceof o ? d ? s[r][l] = u.enums ===
							String ? c[t].values[a[r][l]] : a[r][l] : s[r] = u.enums === String ? c[t]
							.values[a[r]] : a[r] : d ? s[r][l] = c[t].toObject(a[r][l], u) : s[r] = c[t]
							.toObject(a[r], u);
						else {
							var p = !1;
							switch (e.type) {
								case "double":
								case "float":
									d ? s[r][l] = u.json && !isFinite(a[r][l]) ? String(a[r][l]) : a[r][
										l
									] : s[r] = u.json && !isFinite(a[r]) ? String(a[r]) : a[r];
									break;
								case "uint64":
									p = !0;
								case "int64":
								case "sint64":
								case "fixed64":
								case "sfixed64":
									"number" == typeof a[r][l] ? d ? s[r][l] = u.longs === String ?
										String(a[r][l]) : a[r][l] : s[r] = u.longs === String ? String(
											a[r]) : a[r] : d ? s[r][l] = u.longs === String ? n.Long
										.prototype.toString.call(a[r][l]) : u.longs === Number ? new n
										.LongBits(a[r][l].low >>> 0, a[r][l].high >>> 0).toNumber(p) :
										a[r][l] : s[r] = u.longs === String ? n.Long.prototype.toString
										.call(a[r]) : u.longs === Number ? new n.LongBits(a[r].low >>>
											0, a[r].high >>> 0).toNumber(p) : a[r];
									break;
								case "bytes":
									d ? s[r][l] = u.bytes === String ? n.base64.encode(a[r][l], 0, a[r][
											l
										].length) : u.bytes === Array ? Array.prototype.slice.call(a[r][
											l
										]) : a[r][l] : s[r] = u.bytes === String ? n.base64.encode(a[r],
											0, a[r].length) : u.bytes === Array ? Array.prototype.slice
										.call(a[r]) : a[r];
									break;
								default:
									d ? s[r][l] = a[r][l] : s[r] = a[r]
							}
						}
					}
					i._configure = function() {
						o = r(582), n = r(935)
					}, i.fromObject = function(e) {
						var t = e.fieldsArray;
						return function(e) {
							return function(r) {
								if (r instanceof this.ctor) return r;
								if (!t.length) return new this.ctor;
								for (var i = new this.ctor, s = 0; s < t.length; ++s) {
									var c, l = t[s].resolve(),
										u = l.name;
									if (l.map) {
										if (r[u]) {
											if ("object" != typeof r[u]) throw TypeError(l
												.fullName + ": object expected");
											i[u] = {}
										}
										var d = Object.keys(r[u]);
										for (c = 0; c < d.length; ++c) a(l, s, u, n.merge(n
											.copy(e), {
												m: i,
												d: r,
												ksi: d[c]
											}))
									} else if (l.repeated) {
										if (r[u]) {
											if (!Array.isArray(r[u])) throw TypeError(l
												.fullName + ": array expected");
											for (i[u] = [], c = 0; c < r[u].length; ++c) a(
												l, s, u, n.merge(n.copy(e), {
													m: i,
													d: r,
													ksi: c
												}))
										}
									} else(l.resolvedType instanceof o || null != r[u]) &&
										a(l, s, u, n.merge(n.copy(e), {
											m: i,
											d: r
										}))
								}
								return i
							}
						}
					}, i.toObject = function(e) {
						var t = e.fieldsArray.slice().sort(n.compareFieldsById);
						return function(r) {
							return t.length ? function(i, a) {
								a = a || {};
								for (var c, l, u = {}, d = [], p = [], h = [], f = 0; f < t
									.length; ++f) t[f].partOf || (t[f].resolve().repeated ?
									d : t[f].map ? p : h).push(t[f]);
								if (d.length && (a.arrays || a.defaults))
									for (f = 0; f < d.length; ++f) u[d[f].name] = [];
								if (p.length && (a.objects || a.defaults))
									for (f = 0; f < p.length; ++f) u[p[f].name] = {};
								if (h.length && a.defaults)
									for (f = 0; f < h.length; ++f)
										if (l = (c = h[f]).name, c
											.resolvedType instanceof o) u[l] = a.enums =
											String ? c.resolvedType.valuesById[c
												.typeDefault] : c.typeDefault;
										else if (c.long)
									if (n.Long) {
										var m = new n.Long(c.typeDefault.low, c.typeDefault
											.high, c.typeDefault.unsigned);
										u[l] = a.longs === String ? m.toString() : a
											.longs === Number ? m.toNumber() : m
									} else u[l] = a.longs === String ? c.typeDefault
										.toString() : c.typeDefault.toNumber();
								else c.bytes ? u[l] = a.bytes === String ? String
									.fromCharCode.apply(String, c.typeDefault) : Array
									.prototype.slice.call(c.typeDefault).join("*..*").split(
										"*..*") : u[l] = c.typeDefault;
								var g = !1;
								for (f = 0; f < t.length; ++f) {
									l = (c = t[f]).name;
									var E, y, v = e._fieldsArray.indexOf(c);
									if (c.map) {
										if (g || (g = !0), i[l] && (E = Object.keys(i[l])
												.length))
											for (u[l] = {}, y = 0; y < E.length; ++y) s(c,
												v, l, n.merge(n.copy(r), {
													m: i,
													d: u,
													ksi: E[y],
													o: a
												}))
									} else if (c.repeated) {
										if (i[l] && i[l].length)
											for (u[l] = [], y = 0; y < i[l].length; ++y) s(
												c, v, l, n.merge(n.copy(r), {
													m: i,
													d: u,
													ksi: y,
													o: a
												}))
									} else null != i[l] && i.hasOwnProperty(l) && s(c, v, l,
										n.merge(n.copy(r), {
											m: i,
											d: u,
											o: a
										})), c.partOf && a.oneofs && (u[c.partOf.name] =
										l)
								}
								return u
							} : function() {
								return {}
							}
						}
					}
				},
				888: function(e, t, r) {
					var o, n, i;

					function a(e) {
						return "missing required '" + e.name + "'"
					}

					function s(e) {
						return function(t) {
							var r = t.Reader,
								s = t.types,
								c = t.util;
							return function(t, l) {
								t instanceof r || (t = r.create(t));
								for (var u, d = void 0 === l ? t.len : t.pos + l, p = new this
										.ctor; t.pos < d;) {
									var h = t.uint32();
									if (e.group && 4 == (7 & h)) break;
									for (var f = h >>> 3, m = 0, g = !1; m < e.fieldsArray
										.length; ++m) {
										var E = e._fieldsArray[m].resolve(),
											y = E.name,
											v = E.resolvedType instanceof o ? "int32" : E.type;
										if (f == E.id) {
											if (g = !0, E.map) t.skip().pos++, p[y] === c
												.emptyObject && (p[y] = {}), u = t[E.keyType](),
												t.pos++, null != n.long[E.keyType] ? null == n
												.basic[v] ? p[y]["object" == typeof u ? c
													.longToHash(u) : u
												] = s[m].decode(t, t.uint32()) : p[y][
													"object" == typeof u ? c.longToHash(u) : u
												] = t[v]() : null == n.basic[v] ? p[y] = s[m]
												.decode(t, t.uint32()) : p[y] = t[v]();
											else if (E.repeated)
												if (p[y] && p[y].length || (p[y] = []), null !=
													n.packed[v] && 2 == (7 & h))
													for (var _ = t.uint32() + t.pos; t.pos < _;)
														p[y].push(t[v]());
												else null == n.basic[v] ? E.resolvedType.group ?
													p[y].push(s[m].decode(t)) : p[y].push(s[m]
														.decode(t, t.uint32())) : p[y].push(t[v]
														());
											else null == n.basic[v] ? E.resolvedType.group ? p[
												y] = s[m].decode(t) : p[y] = s[m].decode(t,
												t.uint32()) : p[y] = t[v]();
											break
										}
									}
									g || (console.log("t", h), t.skipType(7 & h))
								}
								for (m = 0; m < e._fieldsArray.length; ++m) {
									var T = e._fieldsArray[m];
									if (T.required && !p.hasOwnProperty(T.name)) throw i
										.ProtocolError(a(T), {
											instance: p
										})
								}
								return p
							}
						}
					}
					e.exports = s, s._configure = function() {
						o = r(582), n = r(696), i = r(935)
					}
				},
				929: function(e, t, r) {
					var o, n;

					function i(e) {
						return function(t) {
							var r = t.Writer,
								i = t.types,
								a = t.util;
							return function(t, s) {
								s = s || r.create();
								for (var c = e.fieldsArray.slice().sort(a.compareFieldsById),
										l = 0; l < c.length; l++) {
									var u = c[l],
										d = e._fieldsArray.indexOf(u),
										p = u.resolvedType instanceof o ? "uint32" : u.type,
										h = n.basic[p],
										f = t[u.name];
									if (u.resolvedType instanceof o && "string" == typeof f && (
											f = i[d].values[f]), u.map) {
										if (null != f && t.hasOwnProperty(u.name))
											for (var m = Object.keys(f), g = 0; g < m.length; ++
												g) s.uint32((u.id << 3 | 2) >>> 0).fork()
												.uint32(8 | n.mapKey[u.keyType])[u.keyType](m[
													g]), void 0 === h ? i[d].encode(f[m[g]], s
													.uint32(18).fork()).ldelim().ldelim() : s
												.uint32(16 | h)[p](f[m[g]]).ldelim()
									} else if (u.repeated) {
										if (f && f.length)
											if (u.packed && void 0 !== n.packed[p]) {
												s.uint32((u.id << 3 | 2) >>> 0).fork();
												for (var E = 0; E < f.length; E++) s[p](f[E]);
												s.ldelim()
											} else
												for (var y = 0; y < f.length; y++) void 0 ===
													h ? u.resolvedType.group ? i[d].encode(f[y],
														s.uint32((u.id << 3 | 3) >>> 0)).uint32(
														(u.id << 3 | 4) >>> 0) : i[d].encode(f[
															y], s.uint32((u.id << 3 | 2) >>> 0)
														.fork()).ldelim() : s.uint32((u.id <<
														3 | h) >>> 0)[p](f[y])
									} else(!u.optional || null != f && t.hasOwnProperty(u
										.name)) && (u.optional || null != f && t.hasOwnProperty(
												u.name) || console.warn("注意啦!!!很大概率会报错 类型:", t
												.$type ? t.$type.name : "不晓得", "没有设置对应的属性:", u
												.name, "检查是不是proto文件属性设置为了required"), void 0 ===
											h ? u.resolvedType.group ? i[d].encode(f, s.uint32((
												u.id << 3 | 3) >>> 0)).uint32((u.id << 3 |
												4) >>> 0) : i[d].encode(f, s.uint32((u.id << 3 |
												2) >>> 0).fork()).ldelim() : s.uint32((u.id <<
												3 | h) >>> 0)[p](f))
								}
								return s
							}
						}
					}
					e.exports = i, i._configure = function() {
						o = r(582), n = r(696)
					}
				},
				582: function(e, t, r) {
					e.exports = i;
					var o = r(998);
					((i.prototype = Object.create(o.prototype)).constructor = i).className = "Enum";
					var n = r(476);

					function i(e, t, r, n, i) {
						if (o.call(this, e, r), t && "object" != typeof t) throw TypeError(
							"values must be an object");
						if (this.valuesById = {}, this.values = Object.create(this.valuesById), this
							.comment = n, this.comments = i || {}, this.reserved = void 0, t)
							for (var a = Object.keys(t), s = 0; s < a.length; ++s) "number" == typeof t[
								a[s]] && (this.valuesById[this.values[a[s]] = t[a[s]]] = a[s])
					}
					i.fromJSON = function(e, t) {
						var r = new i(e, t.values, t.options, t.comment, t.comments);
						return r.reserved = t.reserved, r
					}, i.prototype.toJSON = function(e) {
						var t = !!e && Boolean(e.keepComments);
						return util.toObject(["options", this.options, "values", this.values,
							"reserved", this.reserved && this.reserved.length ? this
							.reserved : void 0, "comment", t ? this.comment : void 0,
							"comments", t ? this.comments : void 0
						])
					}, i.prototype.add = function(e, t, r) {
						if (!util.isString(e)) throw TypeError("name must be a string");
						if (!util.isInteger(t)) throw TypeError("id must be an integer");
						if (void 0 !== this.values[e]) throw Error("duplicate name '" + e +
							"' in " + this);
						if (this.isReservedId(t)) throw Error("id " + t + " is reserved in " +
						this);
						if (this.isReservedName(e)) throw Error("name '" + e + "' is reserved in " +
							this);
						if (void 0 !== this.valuesById[t]) {
							if (!this.options || !this.options.allow_alias) throw Error(
								"duplicate id " + t + " in " + this);
							this.values[e] = t
						} else this.valuesById[this.values[e] = t] = e;
						return this.comments[e] = r || null, this
					}, i.prototype.remove = function(e) {
						if (!util.isString(e)) throw TypeError("name must be a string");
						var t = this.values[e];
						if (null == t) throw Error("name '" + e + "' does not exist in " + this);
						return delete this.valuesById[t], delete this.values[e], delete this
							.comments[e], this
					}, i.prototype.isReservedId = function(e) {
						return n.isReservedId(this.reserved, e)
					}, i.prototype.isReservedName = function(e) {
						return n.isReservedName(this.reserved, e)
					}
				},
				286: function(e, t, r) {
					e.exports = l;
					var o, n, i, a, s = r(998);
					((l.prototype = Object.create(s.prototype)).constructor = l).className = "Field";
					var c = /^required|optional|repeated$/;

					function l(e, t, r, o, a, l, u) {
						if (i.isObject(o) ? (u = a, l = o, o = a = void 0) : i.isObject(a) && (u = l,
								l = a, a = void 0), s.call(this, e, l), !i.isInteger(t) || t < 0)
						throw TypeError("id must be a non-negative integer");
						if (!i.isString(r)) throw TypeError("type must be a string");
						if (void 0 !== o && !c.test(o = o.toString().toLowerCase())) throw TypeError(
							"rule must be a string rule");
						if (void 0 !== a && !i.isString(a)) throw TypeError("extend must be a string");
						this.rule = o && "optional" !== o ? o : void 0, this.type = r, this.id = t, this
							.extend = a || void 0, this.required = "required" === o, this.optional = !
							this.required, this.repeated = "repeated" === o, this.map = !1, this
							.message = null, this.partOf = null, this.typeDefault = null, this
							.defaultValue = null, this.long = !!i.Long && void 0 !== n.long[r], this
							.bytes = "bytes" === r, this.resolvedType = null, this.extensionField =
							null, this.declaringField = null, this._packed = null, this.comment = u
					}
					l.fromJSON = function(e, t) {
						return new l(e, t.id, t.type, t.rule, t.extend, t.options, t.comment)
					}, Object.defineProperty(l.prototype, "packed", {
						get: function() {
							return null === this._packed && (this._packed = !1 !== this
								.getOption("packed")), this._packed
						}
					}), l.prototype.setOption = function(e, t, r) {
						return "packed" === e && (this._packed = null), s.prototype.setOption.call(
							this, e, t, r)
					}, l.prototype.toJSON = function(e) {
						var t = !!e && Boolean(e.keepComments);
						return i.toObject(["rule", "optional" !== this.rule && this.rule || void 0,
							"type", this.type, "id", this.id, "extend", this.extend,
							"options", this.options, "comment", t ? this.comment : void 0
						])
					}, l.prototype.resolve = function() {
						if (this.resolved) return this;
						if (void 0 === (this.typeDefault = n.defaults[this.type]) && (this
								.resolvedType = (this.declaringField ? this.declaringField.parent :
									this.parent).lookupTypeOrEnum(this.type), this
								.resolvedType instanceof a ? this.typeDefault = null : this
								.typeDefault = this.resolvedType.values[Object.keys(this
									.resolvedType.values)[0]]), this.options && null != this.options
							.default && (this.typeDefault = this.options.default, this
								.resolvedType instanceof o && "string" == typeof this.typeDefault &&
								(this.typeDefault = this.resolvedType.values[this.typeDefault])),
							this.options && (!0 !== this.options.packed && (void 0 === this.options
									.packed || !this.resolvedType || this.resolvedType instanceof o
									) || delete this.options.packed, Object.keys(this.options)
								.length || (this.options = void 0)), this.long) this.typeDefault = i
							.Long.fromNumber(this.typeDefault, "u" === this.type.charAt(0)), Object
							.freeze && Object.freeze(this.typeDefault);
						else if (this.bytes && "string" == typeof this.typeDefault) {
							var e;
							i.utf8.write(this.typeDefault, e = i.newBuffer(i.utf8.length(this
								.typeDefault)), 0), this.typeDefault = e
						}
						return this.map ? this.defaultValue = i.emptyObject : this.repeated ? this
							.defaultValue = i.emptyArray : this.defaultValue = this.typeDefault,
							this.parent instanceof a && (this.parent.ctor.prototype[this.name] =
								this.defaultValue), s.prototype.resolve.call(this)
					}, l.d = function(e, t, r, o) {
						return "function" == typeof t ? t = i.decorateType(t).name : t &&
							"object" == typeof t && (t = i.decorateEnum(t).name),
							function(n, a) {
								i.decorateType(n.constructor).add(new l(a, e, t, r, {
									default: o
								}))
							}
					}, l._configure = function() {
						a = r(192), o = r(582), n = r(696), i = r(935)
					}
				},
				283: function(e) {
					function t(e) {
						return "undefined" != typeof Float32Array ? function() {
							var t = new Float32Array([-0]),
								r = new Uint8Array(t.buffer),
								o = 128 === r[3];

							function n(e, o, n) {
								t[0] = e, o[n] = r[0], o[n + 1] = r[1], o[n + 2] = r[2], o[n + 3] =
									r[3]
							}

							function i(e, o, n) {
								t[0] = e, o[n] = r[3], o[n + 1] = r[2], o[n + 2] = r[1], o[n + 3] =
									r[0]
							}

							function a(e, o) {
								return r[0] = e[o], r[1] = e[o + 1], r[2] = e[o + 2], r[3] = e[o +
									3], t[0]
							}

							function s(e, o) {
								return r[3] = e[o], r[2] = e[o + 1], r[1] = e[o + 2], r[0] = e[o +
									3], t[0]
							}
							e.writeFloatLE = o ? n : i, e.writeFloatBE = o ? i : n, e.readFloatLE =
								o ? a : s, e.readFloatBE = o ? s : a
						}() : function() {
							function t(e, t, r, o) {
								var n = t < 0 ? 1 : 0;
								if (n && (t = -t), 0 === t) e(1 / t > 0 ? 0 : 2147483648, r, o);
								else if (isNaN(t)) e(2143289344, r, o);
								else if (t > 34028234663852886e22) e((n << 31 | 2139095040) >>> 0,
									r, o);
								else if (t < 11754943508222875e-54) e((n << 31 | Math.round(t /
									1401298464324817e-60)) >>> 0, r, o);
								else {
									var i = Math.floor(Math.log(t) / Math.LN2);
									e((n << 31 | i + 127 << 23 | 8388607 & Math.round(t * Math.pow(
										2, -i) * 8388608)) >>> 0, r, o)
								}
							}

							function a(e, t, r) {
								var o = e(t, r),
									n = 2 * (o >> 31) + 1,
									i = o >>> 23 & 255,
									a = 8388607 & o;
								return 255 === i ? a ? NaN : n * (1 / 0) : 0 === i ?
									1401298464324817e-60 * n * a : n * Math.pow(2, i - 150) * (a +
										8388608)
							}
							e.writeFloatLE = t.bind(null, r), e.writeFloatBE = t.bind(null, o), e
								.readFloatLE = a.bind(null, n), e.readFloatBE = a.bind(null, i)
						}(), "undefined" != typeof Float64Array ? function() {
							var t = new Float64Array([-0]),
								r = new Uint8Array(t.buffer),
								o = 128 === r[7];

							function n(e, o, n) {
								t[0] = e, o[n] = r[0], o[n + 1] = r[1], o[n + 2] = r[2], o[n + 3] =
									r[3], o[n + 4] = r[4], o[n + 5] = r[5], o[n + 6] = r[6], o[n +
										7] = r[7]
							}

							function i(e, o, n) {
								t[0] = e, o[n] = r[7], o[n + 1] = r[6], o[n + 2] = r[5], o[n + 3] =
									r[4], o[n + 4] = r[3], o[n + 5] = r[2], o[n + 6] = r[1], o[n +
										7] = r[0]
							}

							function a(e, o) {
								return r[0] = e[o], r[1] = e[o + 1], r[2] = e[o + 2], r[3] = e[o +
										3], r[4] = e[o + 4], r[5] = e[o + 5], r[6] = e[o + 6], r[
									7] = e[o + 7], t[0]
							}

							function s(e, o) {
								return r[7] = e[o], r[6] = e[o + 1], r[5] = e[o + 2], r[4] = e[o +
										3], r[3] = e[o + 4], r[2] = e[o + 5], r[1] = e[o + 6], r[
									0] = e[o + 7], t[0]
							}
							e.writeDoubleLE = o ? n : i, e.writeDoubleBE = o ? i : n, e
								.readDoubleLE = o ? a : s, e.readDoubleBE = o ? s : a
						}() : function() {
							function t(e, t, r, o, n, i) {
								var a = o < 0 ? 1 : 0;
								if (a && (o = -o), 0 === o) e(0, n, i + t), e(1 / o > 0 ? 0 :
									2147483648, n, i + r);
								else if (isNaN(o)) e(0, n, i + t), e(2146959360, n, i + r);
								else if (o > 17976931348623157e292) e(0, n, i + t), e((a << 31 |
									2146435072) >>> 0, n, i + r);
								else {
									var s;
									if (o < 22250738585072014e-324) e((s = o / 5e-324) >>> 0, n, i +
										t), e((a << 31 | s / 4294967296) >>> 0, n, i + r);
									else {
										var c = Math.floor(Math.log(o) / Math.LN2);
										1024 === c && (c = 1023), e(4503599627370496 * (s = o * Math
											.pow(2, -c)) >>> 0, n, i + t), e((a << 31 | c +
												1023 << 20 | 1048576 * s & 1048575) >>> 0, n,
											i + r)
									}
								}
							}

							function a(e, t, r, o, n) {
								var i = e(o, n + t),
									a = e(o, n + r),
									s = 2 * (a >> 31) + 1,
									c = a >>> 20 & 2047,
									l = 4294967296 * (1048575 & a) + i;
								return 2047 === c ? l ? NaN : s * (1 / 0) : 0 === c ? 5e-324 * s *
									l : s * Math.pow(2, c - 1075) * (l + 4503599627370496)
							}
							e.writeDoubleLE = t.bind(null, r, 0, 4), e.writeDoubleBE = t.bind(null,
									o, 4, 0), e.readDoubleLE = a.bind(null, n, 0, 4), e
								.readDoubleBE = a.bind(null, i, 4, 0)
						}(), e
					}

					function r(e, t, r) {
						t[r] = 255 & e, t[r + 1] = e >>> 8 & 255, t[r + 2] = e >>> 16 & 255, t[r + 3] =
							e >>> 24
					}

					function o(e, t, r) {
						t[r] = e >>> 24, t[r + 1] = e >>> 16 & 255, t[r + 2] = e >>> 8 & 255, t[r + 3] =
							255 & e
					}

					function n(e, t) {
						return (e[t] | e[t + 1] << 8 | e[t + 2] << 16 | e[t + 3] << 24) >>> 0
					}

					function i(e, t) {
						return (e[t] << 24 | e[t + 1] << 16 | e[t + 2] << 8 | e[t + 3]) >>> 0
					}
					e.exports = t(t)
				},
				939: function(e) {
					e.exports = r;
					var t = null;
					try {
						t = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0, 97, 115,
							109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127,
							127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127,
							1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105,
							118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114,
							101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8,
							103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6,
							4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66,
							32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126,
							34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1,
							126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173,
							32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167,
							36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1,
							173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134,
							132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11,
							36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32,
							2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32,
							135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173,
							32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66,
							32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4,
							167, 11
						])), {}).exports
					} catch (e) {}

					function r(e, t, r) {
						this.low = 0 | e, this.high = 0 | t, this.unsigned = !!r
					}

					function o(e) {
						return !0 === (e && e.__isLong__)
					}
					r.prototype.__isLong__, Object.defineProperty(r.prototype, "__isLong__", {
						value: !0
					}), r.isLong = o;
					var n = {},
						i = {};

					function a(e, t) {
						var r, o, a;
						return t ? (a = 0 <= (e >>>= 0) && e < 256) && (o = i[e]) ? o : (r = c(e, (0 |
							e) < 0 ? -1 : 0, !0), a && (i[e] = r), r) : (a = -128 <= (e |= 0) && e <
							128) && (o = n[e]) ? o : (r = c(e, e < 0 ? -1 : 0, !1), a && (n[e] = r),
							r)
					}

					function s(e, t) {
						if (isNaN(e)) return t ? E : g;
						if (t) {
							if (e < 0) return E;
							if (e >= h) return R
						} else {
							if (e <= -f) return O;
							if (e + 1 >= f) return T
						}
						return e < 0 ? s(-e, t).neg() : c(e % p | 0, e / p | 0, t)
					}

					function c(e, t, o) {
						return new r(e, t, o)
					}
					r.fromInt = a, r.fromNumber = s, r.fromBits = c;
					var l = Math.pow;

					function u(e, t, r) {
						if (0 === e.length) throw Error("empty string");
						if ("NaN" === e || "Infinity" === e || "+Infinity" === e || "-Infinity" === e)
							return g;
						if ("number" == typeof t ? (r = t, t = !1) : t = !!t, (r = r || 10) < 2 || 36 <
							r) throw RangeError("radix");
						var o;
						if ((o = e.indexOf("-")) > 0) throw Error("interior hyphen");
						if (0 === o) return u(e.substring(1), t, r).neg();
						for (var n = s(l(r, 8)), i = g, a = 0; a < e.length; a += 8) {
							var c = Math.min(8, e.length - a),
								d = parseInt(e.substring(a, a + c), r);
							if (c < 8) {
								var p = s(l(r, c));
								i = i.mul(p).add(s(d))
							} else i = (i = i.mul(n)).add(s(d))
						}
						return i.unsigned = t, i
					}

					function d(e, t) {
						return "number" == typeof e ? s(e, t) : "string" == typeof e ? u(e, t) : c(e
							.low, e.high, "boolean" == typeof t ? t : e.unsigned)
					}
					r.fromString = u, r.fromValue = d;
					var p = 4294967296,
						h = p * p,
						f = h / 2,
						m = a(1 << 24),
						g = a(0);
					r.ZERO = g;
					var E = a(0, !0);
					r.UZERO = E;
					var y = a(1);
					r.ONE = y;
					var v = a(1, !0);
					r.UONE = v;
					var _ = a(-1);
					r.NEG_ONE = _;
					var T = c(-1, 2147483647, !1);
					r.MAX_VALUE = T;
					var R = c(-1, -1, !0);
					r.MAX_UNSIGNED_VALUE = R;
					var O = c(0, -2147483648, !1);
					r.MIN_VALUE = O;
					var I = r.prototype;
					I.toInt = function() {
							return this.unsigned ? this.low >>> 0 : this.low
						}, I.toNumber = function() {
							return this.unsigned ? (this.high >>> 0) * p + (this.low >>> 0) : this
								.high * p + (this.low >>> 0)
						}, I.toString = function(e) {
							if ((e = e || 10) < 2 || 36 < e) throw RangeError("radix");
							if (this.isZero()) return "0";
							if (this.isNegative()) {
								if (this.eq(O)) {
									var t = s(e),
										r = this.div(t),
										o = r.mul(t).sub(this);
									return r.toString(e) + o.toInt().toString(e)
								}
								return "-" + this.neg().toString(e)
							}
							for (var n = s(l(e, 6), this.unsigned), i = this, a = "";;) {
								var c = i.div(n),
									u = (i.sub(c.mul(n)).toInt() >>> 0).toString(e);
								if ((i = c).isZero()) return u + a;
								for (; u.length < 6;) u = "0" + u;
								a = "" + u + a
							}
						}, I.getHighBits = function() {
							return this.high
						}, I.getHighBitsUnsigned = function() {
							return this.high >>> 0
						}, I.getLowBits = function() {
							return this.low
						}, I.getLowBitsUnsigned = function() {
							return this.low >>> 0
						}, I.getNumBitsAbs = function() {
							if (this.isNegative()) return this.eq(O) ? 64 : this.neg().getNumBitsAbs();
							for (var e = 0 != this.high ? this.high : this.low, t = 31; t > 0 && 0 == (
									e & 1 << t); t--);
							return 0 != this.high ? t + 33 : t + 1
						}, I.isZero = function() {
							return 0 === this.high && 0 === this.low
						}, I.eqz = I.isZero, I.isNegative = function() {
							return !this.unsigned && this.high < 0
						}, I.isPositive = function() {
							return this.unsigned || this.high >= 0
						}, I.isOdd = function() {
							return 1 == (1 & this.low)
						}, I.isEven = function() {
							return 0 == (1 & this.low)
						}, I.equals = function(e) {
							return o(e) || (e = d(e)), (this.unsigned === e.unsigned || this.high >>>
									31 != 1 || e.high >>> 31 != 1) && this.high === e.high && this
								.low === e.low
						}, I.eq = I.equals, I.notEquals = function(e) {
							return !this.eq(e)
						}, I.neq = I.notEquals, I.ne = I.notEquals, I.lessThan = function(e) {
							return this.comp(e) < 0
						}, I.lt = I.lessThan, I.lessThanOrEqual = function(e) {
							return this.comp(e) <= 0
						}, I.lte = I.lessThanOrEqual, I.le = I.lessThanOrEqual, I.greaterThan =
						function(e) {
							return this.comp(e) > 0
						}, I.gt = I.greaterThan, I.greaterThanOrEqual = function(e) {
							return this.comp(e) >= 0
						}, I.gte = I.greaterThanOrEqual, I.ge = I.greaterThanOrEqual, I.compare =
						function(e) {
							if (o(e) || (e = d(e)), this.eq(e)) return 0;
							var t = this.isNegative(),
								r = e.isNegative();
							return t && !r ? -1 : !t && r ? 1 : this.unsigned ? e.high >>> 0 > this
								.high >>> 0 || e.high === this.high && e.low >>> 0 > this.low >>> 0 ? -
								1 : 1 : this.sub(e).isNegative() ? -1 : 1
						}, I.comp = I.compare, I.negate = function() {
							return !this.unsigned && this.eq(O) ? O : this.not().add(y)
						}, I.neg = I.negate, I.add = function(e) {
							o(e) || (e = d(e));
							var t = this.high >>> 16,
								r = 65535 & this.high,
								n = this.low >>> 16,
								i = 65535 & this.low,
								a = e.high >>> 16,
								s = 65535 & e.high,
								l = e.low >>> 16,
								u = 0,
								p = 0,
								h = 0,
								f = 0;
							return h += (f += i + (65535 & e.low)) >>> 16, p += (h += n + l) >>> 16,
								u += (p += r + s) >>> 16, u += t + a, c((h &= 65535) << 16 | (f &=
									65535), (u &= 65535) << 16 | (p &= 65535), this.unsigned)
						}, I.subtract = function(e) {
							return o(e) || (e = d(e)), this.add(e.neg())
						}, I.sub = I.subtract, I.multiply = function(e) {
							if (this.isZero()) return g;
							if (o(e) || (e = d(e)), t) return c(t.mul(this.low, this.high, e.low, e
								.high), t.get_high(), this.unsigned);
							if (e.isZero()) return g;
							if (this.eq(O)) return e.isOdd() ? O : g;
							if (e.eq(O)) return this.isOdd() ? O : g;
							if (this.isNegative()) return e.isNegative() ? this.neg().mul(e.neg()) :
								this.neg().mul(e).neg();
							if (e.isNegative()) return this.mul(e.neg()).neg();
							if (this.lt(m) && e.lt(m)) return s(this.toNumber() * e.toNumber(), this
								.unsigned);
							var r = this.high >>> 16,
								n = 65535 & this.high,
								i = this.low >>> 16,
								a = 65535 & this.low,
								l = e.high >>> 16,
								u = 65535 & e.high,
								p = e.low >>> 16,
								h = 65535 & e.low,
								f = 0,
								E = 0,
								y = 0,
								v = 0;
							return y += (v += a * h) >>> 16, E += (y += i * h) >>> 16, y &= 65535, E +=
								(y += a * p) >>> 16, f += (E += n * h) >>> 16, E &= 65535, f += (E +=
									i * p) >>> 16, E &= 65535, f += (E += a * u) >>> 16, f += r * h +
								n * p + i * u + a * l, c((y &= 65535) << 16 | (v &= 65535), (f &=
									65535) << 16 | (E &= 65535), this.unsigned)
						}, I.mul = I.multiply, I.divide = function(e) {
							if (o(e) || (e = d(e)), e.isZero()) throw Error("division by zero");
							var r, n, i;
							if (t) return this.unsigned || -2147483648 !== this.high || -1 !== e.low ||
								-1 !== e.high ? c((this.unsigned ? t.div_u : t.div_s)(this.low, this
									.high, e.low, e.high), t.get_high(), this.unsigned) : this;
							if (this.isZero()) return this.unsigned ? E : g;
							if (this.unsigned) {
								if (e.unsigned || (e = e.toUnsigned()), e.gt(this)) return E;
								if (e.gt(this.shru(1))) return v;
								i = E
							} else {
								if (this.eq(O)) return e.eq(y) || e.eq(_) ? O : e.eq(O) ? y : (r = this
									.shr(1).div(e).shl(1)).eq(g) ? e.isNegative() ? y : _ : (n =
									this.sub(e.mul(r)), i = r.add(n.div(e)));
								if (e.eq(O)) return this.unsigned ? E : g;
								if (this.isNegative()) return e.isNegative() ? this.neg().div(e.neg()) :
									this.neg().div(e).neg();
								if (e.isNegative()) return this.div(e.neg()).neg();
								i = g
							}
							for (n = this; n.gte(e);) {
								r = Math.max(1, Math.floor(n.toNumber() / e.toNumber()));
								for (var a = Math.ceil(Math.log(r) / Math.LN2), u = a <= 48 ? 1 : l(2,
										a - 48), p = s(r), h = p.mul(e); h.isNegative() || h.gt(n);) h =
									(p = s(r -= u, this.unsigned)).mul(e);
								p.isZero() && (p = y), i = i.add(p), n = n.sub(h)
							}
							return i
						}, I.div = I.divide, I.modulo = function(e) {
							return o(e) || (e = d(e)), t ? c((this.unsigned ? t.rem_u : t.rem_s)(this
									.low, this.high, e.low, e.high), t.get_high(), this.unsigned) : this
								.sub(this.div(e).mul(e))
						}, I.mod = I.modulo, I.rem = I.modulo, I.not = function() {
							return c(~this.low, ~this.high, this.unsigned)
						}, I.and = function(e) {
							return o(e) || (e = d(e)), c(this.low & e.low, this.high & e.high, this
								.unsigned)
						}, I.or = function(e) {
							return o(e) || (e = d(e)), c(this.low | e.low, this.high | e.high, this
								.unsigned)
						}, I.xor = function(e) {
							return o(e) || (e = d(e)), c(this.low ^ e.low, this.high ^ e.high, this
								.unsigned)
						}, I.shiftLeft = function(e) {
							return o(e) && (e = e.toInt()), 0 == (e &= 63) ? this : e < 32 ? c(this
								.low << e, this.high << e | this.low >>> 32 - e, this.unsigned) : c(
								0, this.low << e - 32, this.unsigned)
						}, I.shl = I.shiftLeft, I.shiftRight = function(e) {
							return o(e) && (e = e.toInt()), 0 == (e &= 63) ? this : e < 32 ? c(this
									.low >>> e | this.high << 32 - e, this.high >> e, this.unsigned) :
								c(this.high >> e - 32, this.high >= 0 ? 0 : -1, this.unsigned)
						}, I.shr = I.shiftRight, I.shiftRightUnsigned = function(e) {
							if (o(e) && (e = e.toInt()), 0 == (e &= 63)) return this;
							var t = this.high;
							return e < 32 ? c(this.low >>> e | t << 32 - e, t >>> e, this.unsigned) : c(
								32 === e ? t : t >>> e - 32, 0, this.unsigned)
						}, I.shru = I.shiftRightUnsigned, I.shr_u = I.shiftRightUnsigned, I.toSigned =
						function() {
							return this.unsigned ? c(this.low, this.high, !1) : this
						}, I.toUnsigned = function() {
							return this.unsigned ? this : c(this.low, this.high, !0)
						}, I.toBytes = function(e) {
							return e ? this.toBytesLE() : this.toBytesBE()
						}, I.toBytesLE = function() {
							var e = this.high,
								t = this.low;
							return [255 & t, t >>> 8 & 255, t >>> 16 & 255, t >>> 24, 255 & e, e >>> 8 &
								255, e >>> 16 & 255, e >>> 24
							]
						}, I.toBytesBE = function() {
							var e = this.high,
								t = this.low;
							return [e >>> 24, e >>> 16 & 255, e >>> 8 & 255, 255 & e, t >>> 24, t >>>
								16 & 255, t >>> 8 & 255, 255 & t
							]
						}, r.fromBytes = function(e, t, o) {
							return o ? r.fromBytesLE(e, t) : r.fromBytesBE(e, t)
						}, r.fromBytesLE = function(e, t) {
							return new r(e[0] | e[1] << 8 | e[2] << 16 | e[3] << 24, e[4] | e[5] << 8 |
								e[6] << 16 | e[7] << 24, t)
						}, r.fromBytesBE = function(e, t) {
							return new r(e[4] << 24 | e[5] << 16 | e[6] << 8 | e[7], e[0] << 24 | e[
								1] << 16 | e[2] << 8 | e[3], t)
						}
				},
				365: function(e, t, r) {
					e.exports = n;
					var o = r(935);

					function n(e, t) {
						this.lo = e >>> 0, this.hi = t >>> 0
					}
					var i = n.zero = new n(0, 0);
					i.toNumber = function() {
						return 0
					}, i.zzEncode = i.zzDecode = function() {
						return this
					}, i.length = function() {
						return 1
					};
					var a = n.zeroHash = "\0\0\0\0\0\0\0\0";
					n.fromNumber = function(e) {
						if (0 === e) return i;
						var t = e < 0;
						t && (e = -e);
						var r = e >>> 0,
							o = (e - r) / 4294967296 >>> 0;
						return t && (o = ~o >>> 0, r = ~r >>> 0, ++r > 4294967295 && (r = 0, ++o >
							4294967295 && (o = 0))), new n(r, o)
					}, n.from = function(e) {
						if ("number" == typeof e) return n.fromNumber(e);
						if ("string" == typeof e || e instanceof String) {
							if (!o.Long) return n.fromNumber(parseInt(e, 10));
							e = o.Long.fromString(e)
						}
						return e.low || e.high ? new n(e.low >>> 0, e.high >>> 0) : i
					}, n.prototype.toNumber = function(e) {
						if (!e && this.hi >>> 31) {
							var t = 1 + ~this.lo >>> 0,
								r = ~this.hi >>> 0;
							return t || (r = r + 1 >>> 0), -(t + 4294967296 * r)
						}
						return this.lo + 4294967296 * this.hi
					}, n.prototype.toLong = function(e) {
						return o.Long ? new o.Long(0 | this.lo, 0 | this.hi, Boolean(e)) : {
							low: 0 | this.lo,
							high: 0 | this.hi,
							unsigned: Boolean(e)
						}
					};
					var s = String.prototype.charCodeAt;
					n.fromHash = function(e) {
						return e === a ? i : new n((s.call(e, 0) | s.call(e, 1) << 8 | s.call(e,
							2) << 16 | s.call(e, 3) << 24) >>> 0, (s.call(e, 4) | s.call(e,
							5) << 8 | s.call(e, 6) << 16 | s.call(e, 7) << 24) >>> 0)
					}, n.prototype.toHash = function() {
						return String.fromCharCode(255 & this.lo, this.lo >>> 8 & 255, this.lo >>>
							16 & 255, this.lo >>> 24, 255 & this.hi, this.hi >>> 8 & 255, this
							.hi >>> 16 & 255, this.hi >>> 24)
					}, n.prototype.zzEncode = function() {
						var e = this.hi >> 31;
						return this.hi = ((this.hi << 1 | this.lo >>> 31) ^ e) >>> 0, this.lo = (
							this.lo << 1 ^ e) >>> 0, this
					}, n.prototype.zzDecode = function() {
						var e = -(1 & this.lo);
						return this.lo = ((this.lo >>> 1 | this.hi << 31) ^ e) >>> 0, this.hi = (
							this.hi >>> 1 ^ e) >>> 0, this
					}, n.prototype.length = function() {
						var e = this.lo,
							t = (this.lo >>> 28 | this.hi << 4) >>> 0,
							r = this.hi >>> 24;
						return 0 === r ? 0 === t ? e < 16384 ? e < 128 ? 1 : 2 : e < 2097152 ? 3 :
							4 : t < 16384 ? t < 128 ? 5 : 6 : t < 2097152 ? 7 : 8 : r < 128 ? 9 : 10
					}
				},
				435: function(e, t, r) {
					e.exports = a;
					var o, n, i = r(286);

					function a(e, t, r, o, a, s) {
						if (i.call(this, e, t, o, void 0, void 0, a, s), !n.isString(r))
						throw TypeError("keyType must be a string");
						this.keyType = r, this.resolvedKeyType = null, this.map = !0
					}((a.prototype = Object.create(i.prototype)).constructor = a).className =
						"MapField", a.fromJSON = function(e, t) {
							return new a(e, t.id, t.keyType, t.type, t.options, t.comment)
						}, a.prototype.toJSON = function(e) {
							var t = !!e && Boolean(e.keepComments);
							return n.toObject(["keyType", this.keyType, "type", this.type, "id", this
								.id, "extend", this.extend, "options", this.options, "comment",
								t ? this.comment : void 0
							])
						}, a.prototype.resolve = function() {
							if (this.resolved) return this;
							if (void 0 === o.mapKey[this.keyType]) throw Error("invalid key type: " +
								this.keyType);
							return i.prototype.resolve.call(this)
						}, a.d = function(e, t, r) {
							return "function" == typeof r ? r = n.decorateType(r).name : r &&
								"object" == typeof r && (r = n.decorateEnum(r).name),
								function(o, i) {
									n.decorateType(o.constructor).add(new a(i, e, t, r))
								}
						}, a._configure = function() {
							o = r(696), n = r(935)
						}
				},
				339: function(e, t, r) {
					"use strict";
					var o;

					function n(e) {
						if (e)
							for (var t = Object.keys(e), r = 0; r < t.length; ++r) this[t[r]] = e[t[r]]
					}
					e.exports = n, n.create = function(e) {
						return this.$type.create(e)
					}, n.encode = function(e, t) {
						return arguments.length ? 1 == arguments.length ? this.$type.encode(
								arguments[0]) : this.$type.encode(arguments[0], arguments[1]) : this
							.$type.encode(this)
					}, n.encodeDelimited = function(e, t) {
						return this.$type.encodeDelimited(e, t)
					}, n.decode = function(e) {
						return this.$type.decode(e)
					}, n.decodeDelimited = function(e) {
						return this.$type.decodeDelimited(e)
					}, n.verify = function(e) {
						return this.$type.verify(e)
					}, n.fromObject = function(e) {
						return this.$type.fromObject(e)
					}, n.toObject = function(e, t) {
						return e = e || this, this.$type.toObject(e, t)
					}, n.prototype.toJSON = function() {
						return this.$type.toObject(this, o.toJSONOptions)
					}, n.set = function(e, t) {
						n[e] = t
					}, n.get = function(e) {
						return n[e]
					}, n._configure = function() {
						o = r(935)
					}
				},
				484: function(e, t, r) {
					"use strict";
					e.exports = i;
					var o, n = r(998);

					function i(e, t, r, i, a, s, c, l) {
						if (o.isObject(a) ? (c = a, a = s = void 0) : o.isObject(s) && (c = s, s =
								void 0), void 0 !== t && !o.isString(t)) throw TypeError(
							"type must be a string");
						if (!o.isString(r)) throw TypeError("requestType must be a string");
						if (!o.isString(i)) throw TypeError("responseType must be a string");
						n.call(this, e, c), this.type = t || "rpc", this.requestType = r, this
							.requestStream = !!a || void 0, this.responseType = i, this
							.responseStream = !!s || void 0, this.resolvedRequestType = null, this
							.resolvedResponseType = null, this.comment = l
					}((i.prototype = Object.create(n.prototype)).constructor = i).className = "Method",
						i.fromJSON = function(e, t) {
							return new i(e, t.type, t.requestType, t.responseType, t.requestStream, t
								.responseStream, t.options, t.comment)
						}, i.prototype.toJSON = function(e) {
							var t = !!e && Boolean(e.keepComments);
							return o.toObject(["type", "rpc" !== this.type && this.type || void 0,
								"requestType", this.requestType, "requestStream", this
								.requestStream, "responseType", this.responseType,
								"responseStream", this.responseStream, "options", this.options,
								"comment", t ? this.comment : void 0
							])
						}, i.prototype.resolve = function() {
							return this.resolved ? this : (this.resolvedRequestType = this.parent
								.lookupType(this.requestType), this.resolvedResponseType = this
								.parent.lookupType(this.responseType), n.prototype.resolve.call(
									this))
						}, i._configure = function() {
							o = r(935)
						}
				},
				476: function(e, t, r) {
					e.exports = u;
					var o, n, i, a, s, c = r(998);

					function l(e, t) {
						if (e && e.length) {
							for (var r = {}, o = 0; o < e.length; ++o) r[e[o].name] = e[o].toJSON(t);
							return r
						}
					}

					function u(e, t) {
						c.call(this, e, t), this.nested = void 0, this._nestedArray = null
					}

					function d(e) {
						return e._nestedArray = null, e
					}((u.prototype = Object.create(c.prototype)).constructor = u).className =
						"Namespace", u.fromJSON = function(e, t) {
							return new u(e, t.options).addJSON(t.nested)
						}, u.arrayToJSON = l, u.isReservedId = function(e, t) {
							if (e)
								for (var r = 0; r < e.length; ++r)
									if ("string" != typeof e[r] && e[r][0] <= t && e[r][1] >= t)
									return !0;
							return !1
						}, u.isReservedName = function(e, t) {
							if (e)
								for (var r = 0; r < e.length; ++r)
									if (e[r] === t) return !0;
							return !1
						}, Object.defineProperty(u.prototype, "nestedArray", {
							get: function() {
								return this._nestedArray || (this._nestedArray = i.toArray(this
									.nested))
							}
						}), u.prototype.toJSON = function(e) {
							return i.toObject(["options", this.options, "nested", l(this.nestedArray,
								e)])
						}, u.prototype.addJSON = function(e) {
							if (e)
								for (var t, r = Object.keys(e), i = 0; i < r.length; ++i) t = e[r[i]],
									this.add((void 0 !== t.fields ? a.fromJSON : void 0 !== t.values ? o
										.fromJSON : void 0 !== t.methods ? s.fromJSON : void 0 !== t
										.id ? n.fromJSON : u.fromJSON)(r[i], t));
							return this
						}, u.prototype.get = function(e) {
							return this.nested && this.nested[e] || null
						}, u.prototype.getEnum = function(e) {
							if (this.nested && this.nested[e] instanceof o) return this.nested[e]
							.values;
							throw Error("no such enum: " + e)
						}, u.prototype.add = function(e) {
							if (!(e instanceof n && void 0 !== e.extend || e instanceof a ||
									e instanceof o || e instanceof s || e instanceof u))
							throw TypeError("object must be a valid nested object");
							if (this.nested) {
								var t = this.get(e.name);
								if (t) {
									if (!(t instanceof u && e instanceof u) || t instanceof a ||
										t instanceof s) throw Error("duplicate name '" + e.name +
										"' in " + this);
									for (var r = t.nestedArray, i = 0; i < r.length; ++i) e.add(r[i]);
									this.remove(t), this.nested || (this.nested = {}), e.setOptions(t
										.options, !0)
								}
							} else this.nested = {};
							return this.nested[e.name] = e, e.onAdd(this), d(this)
						}, u.prototype.remove = function(e) {
							if (!(e instanceof c)) throw TypeError("object must be a ReflectionObject");
							if (e.parent !== this) throw Error(e + " is not a member of " + this);
							return delete this.nested[e.name], Object.keys(this.nested).length || (this
								.nested = void 0), e.onRemove(this), d(this)
						}, u.prototype.define = function(e, t) {
							if (i.isString(e)) e = e.split(".");
							else if (!Array.isArray(e)) throw TypeError("illegal path");
							if (e && e.length && "" === e[0]) throw Error("path must be relative");
							for (var r = this; e.length > 0;) {
								var o = e.shift();
								if (r.nested && r.nested[o]) {
									if (!((r = r.nested[o]) instanceof u)) throw Error(
										"path conflicts with non-namespace objects")
								} else r.add(r = new u(o))
							}
							return t && r.addJSON(t), r
						}, u.prototype.resolveAll = function() {
							for (var e = this.nestedArray, t = 0; t < e.length;) e[t] instanceof u ? e[
								t++].resolveAll() : e[t++].resolve();
							return this.resolve()
						}, u.prototype.lookup = function(e, t, r) {
							if ("boolean" == typeof t ? (r = t, t = void 0) : t && !Array.isArray(t) &&
								(t = [t]), i.isString(e) && e.length) {
								if ("." === e) return this.root;
								e = e.split(".")
							} else if (!e.length) return this;
							if ("" === e[0]) return this.root.lookup(e.slice(1), t);
							var o = this.get(e[0]);
							if (o) {
								if (1 === e.length) {
									if (!t || t.indexOf(o.constructor) > -1) return o
								} else if (o instanceof u && (o = o.lookup(e.slice(1), t, !0))) return o
							} else
								for (var n = 0; n < this.nestedArray.length; ++n)
									if (this._nestedArray[n] instanceof u && (o = this._nestedArray[n]
											.lookup(e, t, !0))) return o;
							return null === this.parent || r ? null : this.parent.lookup(e, t)
						}, u.prototype.lookupType = function(e) {
							var t = this.lookup(e, [a]);
							if (!t) throw Error("no such type: " + e);
							return t
						}, u.prototype.lookupEnum = function(e) {
							var t = this.lookup(e, [o]);
							if (!t) throw Error("no such Enum '" + e + "' in " + this);
							return t
						}, u.prototype.lookupTypeOrEnum = function(e) {
							var t = this.lookup(e, [a, o]);
							if (!t) throw Error("no such Type or Enum '" + e + "' in " + this);
							return t
						}, u.prototype.lookupService = function(e) {
							var t = this.lookup(e, [s]);
							if (!t) throw Error("no such Service '" + e + "' in " + this);
							return t
						}, u._configure = function() {
							o = r(582), n = r(286), i = r(935), a = r(192), s = r(447)
						}
				},
				998: function(e, t, r) {
					"use strict";
					var o, n;

					function i(e, t) {
						if (!o.isString(e)) throw TypeError("name must be a string");
						if (t && !o.isObject(t)) throw TypeError("options must be an object");
						this.options = t, this.name = e, this.parent = null, this.resolved = !1, this
							.comment = null, this.filename = null
					}
					e.exports = i, i.className = "ReflectionObject", Object.defineProperties(i
						.prototype, {
							root: {
								get: function() {
									for (var e = this; null !== e.parent;) e = e.parent;
									return e
								}
							},
							fullName: {
								get: function() {
									for (var e = [this.name], t = this.parent; t;) e.unshift(t
										.name), t = t.parent;
									return e.join(".")
								}
							}
						}), i.prototype.toJSON = function() {
						throw Error()
					}, i.prototype.onAdd = function(e) {
						this.parent && this.parent !== e && this.parent.remove(this), this.parent =
							e, this.resolved = !1;
						var t = e.root;
						t instanceof n && t._handleAdd(this)
					}, i.prototype.onRemove = function(e) {
						var t = e.root;
						t instanceof n && t._handleRemove(this), this.parent = null, this
							.resolved = !1
					}, i.prototype.resolve = function() {
						return this.resolved || this.root instanceof n && (this.resolved = !0), this
					}, i.prototype.getOption = function(e) {
						if (this.options) return this.options[e]
					}, i.prototype.setOption = function(e, t, r) {
						return r && this.options && void 0 !== this.options[e] || ((this.options ||
							(this.options = {}))[e] = t), this
					}, i.prototype.setOptions = function(e, t) {
						if (e)
							for (var r = Object.keys(e), o = 0; o < r.length; ++o) this.setOption(r[
								o], e[r[o]], t);
						return this
					}, i.prototype.toString = function() {
						var e = this.constructor.className,
							t = this.fullName;
						return t.length ? e + " " + t : e
					}, i._configure = function(e) {
						n = r(685), o = r(935)
					}
				},
				735: function(e, t, r) {
					e.exports = a;
					var o, n, i = r(998);

					function a(e, t, r, o) {
						if (Array.isArray(t) || (r = t, t = void 0), i.call(this, e, r), void 0 !== t &&
							!Array.isArray(t)) throw TypeError("fieldNames must be an Array");
						this.oneof = t || [], this.fieldsArray = [], this.comment = o
					}

					function s(e) {
						if (e.parent)
							for (var t = 0; t < e.fieldsArray.length; ++t) e.fieldsArray[t].parent || e
								.parent.add(e.fieldsArray[t])
					}((a.prototype = Object.create(i.prototype)).constructor = a).className = "OneOf", a
						.fromJSON = function(e, t) {
							return new a(e, t.oneof, t.options, t.comment)
						}, a.prototype.toJSON = function(e) {
							var t = !!e && Boolean(e.keepComments);
							return n.toObject(["options", this.options, "oneof", this.oneof, "comment",
								t ? this.comment : void 0
							])
						}, a.prototype.add = function(e) {
							if (!(e instanceof o)) throw TypeError("field must be a Field");
							return e.parent && e.parent !== this.parent && e.parent.remove(e), this
								.oneof.push(e.name), this.fieldsArray.push(e), e.partOf = this, s(this),
								this
						}, a.prototype.remove = function(e) {
							if (!(e instanceof o)) throw TypeError("field must be a Field");
							var t = this.fieldsArray.indexOf(e);
							if (t < 0) throw Error(e + " is not a member of " + this);
							return this.fieldsArray.splice(t, 1), (t = this.oneof.indexOf(e.name)) > -
								1 && this.oneof.splice(t, 1), e.partOf = null, this
						}, a.prototype.onAdd = function(e) {
							i.prototype.onAdd.call(this, e);
							for (var t = 0; t < this.oneof.length; ++t) {
								var r = e.get(this.oneof[t]);
								r && !r.partOf && (r.partOf = this, this.fieldsArray.push(r))
							}
							s(this)
						}, a.prototype.onRemove = function(e) {
							for (var t, r = 0; r < this.fieldsArray.length; ++r)(t = this.fieldsArray[
								r]).parent && t.parent.remove(t);
							i.prototype.onRemove.call(this, e)
						}, a.d = function() {
							for (var e = new Array(arguments.length), t = 0; t < arguments.length;) e[
								t] = arguments[t++];
							return function(t, r) {
								n.decorateType(t.constructor).add(new a(r, e)), Object
									.defineProperty(t, r, {
										get: n.oneOfGetter(e),
										set: n.oneOfSetter(e)
									})
							}
						}, a._configure = function() {
							o = r(286), n = r(935)
						}
				},
				845: function(e, t, r) {
					"use strict";
					var o, n, i, a, s, c, l, u, d, p, h;
					e.exports = I, I.filename = null, I.defaults = {
						keepCase: !1
					};
					var f = /^[1-9][0-9]*$/,
						m = /^-?[1-9][0-9]*$/,
						g = /^0[x][0-9a-fA-F]+$/,
						E = /^-?0[x][0-9a-fA-F]+$/,
						y = /^0[0-7]+$/,
						v = /^-?0[0-7]+$/,
						_ = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,
						T = /^[a-zA-Z_][a-zA-Z_0-9]*$/,
						R = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,
						O = /^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/;

					function I(e, t, r) {
						t instanceof n || (r = t, t = new n), r || (r = I.defaults);
						var S, C, A, N, M, b = o(e, r.alternateCommentMode || !1),
							U = b.next,
							P = b.push,
							k = b.peek,
							w = b.skip,
							L = b.cmnt,
							D = !0,
							x = !1,
							G = t,
							B = r.keepCase ? function(e) {
								return e
							} : h.camelCase;

						function H(e, t, r) {
							var o = I.filename;
							return r || (I.filename = null), Error("illegal " + (t || "token") + " '" +
								e + "' (" + (o ? o + ", " : "") + "line " + b.line + ")")
						}

						function j() {
							var e, t = [];
							do {
								if ('"' !== (e = U()) && "'" !== e) throw H(e);
								t.push(U()), w(e), e = k()
							} while ('"' === e || "'" === e);
							return t.join("")
						}

						function F(e) {
							var t = U();
							switch (t) {
								case "'":
								case '"':
									return P(t), j();
								case "true":
								case "TRUE":
									return !0;
								case "false":
								case "FALSE":
									return !1
							}
							try {
								return function(e, t) {
									var r = 1;
									switch ("-" === e.charAt(0) && (r = -1, e = e.substring(1)),
										e) {
										case "inf":
										case "INF":
										case "Inf":
											return r * (1 / 0);
										case "nan":
										case "NAN":
										case "Nan":
										case "NaN":
											return NaN;
										case "0":
											return 0
									}
									if (f.test(e)) return r * parseInt(e, 10);
									if (g.test(e)) return r * parseInt(e, 16);
									if (y.test(e)) return r * parseInt(e, 8);
									if (_.test(e)) return r * parseFloat(e);
									throw H(e, "number", !0)
								}(t)
							} catch (r) {
								if (e && R.test(t)) return t;
								throw H(t, "value")
							}
						}

						function W(e, t) {
							var r, o;
							do {
								!t || '"' !== (r = k()) && "'" !== r ? e.push([o = K(U()), w("to", !0) ?
									K(U()) : o
								]) : e.push(j())
							} while (w(",", !0));
							w(";")
						}

						function K(e, t) {
							switch (e) {
								case "max":
								case "MAX":
								case "Max":
									return 536870911;
								case "0":
									return 0
							}
							if (!t && "-" === e.charAt(0)) throw H(e, "id");
							if (m.test(e)) return parseInt(e, 10);
							if (E.test(e)) return parseInt(e, 16);
							if (v.test(e)) return parseInt(e, 8);
							throw H(e, "id")
						}

						function q() {
							if (void 0 !== S) throw H("package");
							if (S = U(), !R.test(S)) throw H(S, "name");
							G = G.define(S), w(";")
						}

						function z() {
							var e, t = k();
							switch (t) {
								case "weak":
									e = A || (A = []), U();
									break;
								case "public":
									U();
								default:
									e = C || (C = [])
							}
							t = j(), w(";"), e.push(t)
						}

						function V() {
							if (w("="), N = j(), !(x = "proto3" === N) && "proto2" !== N) throw H(N,
								"syntax");
							w(";")
						}

						function J(e, t) {
							switch (t) {
								case "option":
									return Q(e, t), w(";"), !0;
								case "message":
									return function(e, t) {
										if (!T.test(t = U())) throw H(t, "type name");
										var r = new i(t);
										X(r, (function(e) {
											if (!J(r, e)) switch (e) {
												case "map":
													! function(e) {
														w("<");
														var t = U();
														if (void 0 === p.mapKey[t])
															throw H(t, "type");
														w(",");
														var r = U();
														if (!R.test(r)) throw H(r,
															"type");
														w(">");
														var o = U();
														if (!T.test(o)) throw H(o,
															"name");
														w("=");
														var n = new s(B(o), K(U()),
															t, r);
														X(n, (function(e) {
															if ("option" !==
																e) throw H(
																e
																);
															Q(n, e), w(
																";")
														}), (function() {
															ee(n)
														})), e.add(n)
													}(r);
													break;
												case "required":
												case "optional":
												case "repeated":
													Y(r, e);
													break;
												case "oneof":
													! function(e, t) {
														if (!T.test(t = U()))
														throw H(t, "name");
														var r = new c(B(t));
														X(r, (function(e) {
															"option" ===
															e ? (Q(r,
																	e),
																	w(
																		";")
																	) :
																(P(e),
																	Y(r,
																		"optional")
																	)
														})), e.add(r)
													}(r, e);
													break;
												case "extensions":
													W(r.extensions || (r
														.extensions = []));
													break;
												case "reserved":
													W(r.reserved || (r
													.reserved = []), !0);
													break;
												default:
													if (!x || !R.test(e)) throw H(
													e);
													P(e), Y(r, "optional")
											}
										})), e.add(r)
									}(e, t), !0;
								case "enum":
									return function(e, t) {
										if (!T.test(t = U())) throw H(t, "name");
										var r = new l(t);
										X(r, (function(e) {
											switch (e) {
												case "option":
													Q(r, e), w(";");
													break;
												case "reserved":
													W(r.reserved || (r.reserved = []), !
														0);
													break;
												default:
													! function(e, t) {
														if (!T.test(t)) throw H(t,
															"name");
														w("=");
														var r = K(U(), !0),
															o = {};
														X(o, (function(e) {
															if ("option" !==
																e) throw H(
																e);
															Q(o, e), w(";")
														}), (function() {
															ee(o)
														})), e.add(t, r, o.comment)
													}(r, e)
											}
										})), e.add(r)
									}(e, t), !0;
								case "service":
									return function(e, t) {
										if (!T.test(t = U())) throw H(t, "service name");
										var r = new u(t);
										X(r, (function(e) {
											if (!J(r, e)) {
												if ("rpc" !== e) throw H(e);
												! function(e, t) {
													var r = t;
													if (!T.test(t = U())) throw H(t,
														"name");
													var o, n, i, a, s = t;
													if (w("("), w("stream", !0) && (
															n = !0), !R.test(t = U()))
														throw H(t);
													if (o = t, w(")"), w("returns"), w(
															"("), w("stream", !0) && (
															a = !0), !R.test(t = U()))
														throw H(t);
													i = t, w(")");
													var c = new d(s, r, o, i, n, a);
													X(c, (function(e) {
														if ("option" !== e)
															throw H(e);
														Q(c, e), w(";")
													})), e.add(c)
												}(r, e)
											}
										})), e.add(r)
									}(e, t), !0;
								case "extend":
									return function(e, t) {
										if (!R.test(t = U())) throw H(t, "reference");
										var r = t;
										X(null, (function(t) {
											switch (t) {
												case "required":
												case "repeated":
												case "optional":
													Y(e, t, r);
													break;
												default:
													if (!x || !R.test(t)) throw H(t);
													P(t), Y(e, "optional", r)
											}
										}))
									}(e, t), !0
							}
							return !1
						}

						function X(e, t, r) {
							var o = b.line;
							if (e && (e.comment = L(), e.filename = I.filename), w("{", !0)) {
								for (var n;
									"}" !== (n = U());) t(n);
								w(";", !0)
							} else r && r(), w(";"), e && "string" != typeof e.comment && (e.comment =
								L(o))
						}

						function Y(e, t, r) {
							var o = U();
							if ("group" !== o) {
								if (!R.test(o)) throw H(o, "type");
								var n = U();
								if (!T.test(n)) throw H(n, "name");
								n = B(n), w("=");
								var s = new a(n, K(U()), o, t, r);
								X(s, (function(e) {
										if ("option" !== e) throw H(e);
										Q(s, e), w(";")
									}), (function() {
										ee(s)
									})), e.add(s), x || !s.repeated || void 0 === p.packed[o] &&
									void 0 !== p.basic[o] || s.setOption("packed", !1, !0)
							} else ! function(e, t) {
								var r = U();
								if (!T.test(r)) throw H(r, "name");
								var o = h.lcFirst(r);
								r === o && (r = h.ucFirst(r)), w("=");
								var n = K(U()),
									s = new i(r);
								s.group = !0;
								var c = new a(o, n, r, t);
								c.filename = I.filename, X(s, (function(e) {
									switch (e) {
										case "option":
											Q(s, e), w(";");
											break;
										case "required":
										case "optional":
										case "repeated":
											Y(s, e);
											break;
										default:
											throw H(e)
									}
								})), e.add(s).add(c)
							}(e, t)
						}

						function Q(e, t) {
							var r = w("(", !0);
							if (!R.test(t = U())) throw H(t, "name");
							var o = t;
							r && (w(")"), o = "(" + o + ")", t = k(), O.test(t) && (o += t, U())), w(
								"="), $(e, o)
						}

						function $(e, t) {
							if (w("{", !0))
								do {
									if (!T.test(M = U())) throw H(M, "name");
									"{" === k() ? $(e, t + "." + M) : (w(":"), "{" === k() ? $(e, t +
										"." + M) : Z(e, t + "." + M, F(!0)))
								} while (!w("}", !0));
							else Z(e, t, F(!0))
						}

						function Z(e, t, r) {
							e.setOption && e.setOption(t, r)
						}

						function ee(e) {
							if (w("[", !0)) {
								do {
									Q(e, "option")
								} while (w(",", !0));
								w("]")
							}
							return e
						}
						for (; null !== (M = U());) switch (M) {
							case "package":
								if (!D) throw H(M);
								q();
								break;
							case "import":
								if (!D) throw H(M);
								z();
								break;
							case "syntax":
								if (!D) throw H(M);
								V();
								break;
							case "option":
								if (!D) throw H(M);
								Q(G, M), w(";");
								break;
							default:
								if (J(G, M)) {
									D = !1;
									continue
								}
								throw H(M)
						}
						return I.filename = null, {
							package: S,
							imports: C,
							weakImports: A,
							syntax: N,
							root: t
						}
					}
					I._configure = function() {
						o = r(869), n = r(685), i = r(192), a = r(286), s = r(435), c = r(735), l =
							r(582), u = r(447), d = r(484), p = r(696), h = r(935)
					}
				},
				444: function(e) {
					var t = e.exports,
						r = t.isAbsolute = function(e) {
							return /^(?:\/|\w+:)/.test(e)
						},
						o = t.normalize = function(e) {
							var t = (e = e.replace(/\\/g, "/").replace(/\/{2,}/g, "/")).split("/"),
								o = r(e),
								n = "";
							o && (n = t.shift() + "/");
							for (var i = 0; i < t.length;) ".." === t[i] ? i > 0 && ".." !== t[i - 1] ?
								t.splice(--i, 2) : o ? t.splice(i, 1) : ++i : "." === t[i] ? t.splice(i,
									1) : ++i;
							return n + t.join("/")
						};
					t.resolve = function(e, t, n) {
						return n || (t = o(t)), r(t) ? t : (n || (e = o(e)), (e = e.replace(
							/(?:\/|^)[^/]+$/, "")).length ? o(e + "/" + t) : t)
					}
				},
				997: function(e) {
					e.exports = function(e, t, r) {
						var o = r || 8192,
							n = o >>> 1,
							i = null,
							a = o;
						return function(r) {
							if (r < 1 || r > n) return e(r);
							a + r > o && (i = e(o), a = 0);
							var s = t.call(i, a, a += r);
							return 7 & a && (a = 1 + (7 | a)), s
						}
					}
				},
				494: function(e, t, r) {
					e.exports = s;
					var o, n, i = r(935);

					function a(e, t) {
						return RangeError("index out of range: " + e.pos + " + " + (t || 1) + " > " + e
							.len)
					}

					function s(e) {
						this.buf = e, this.pos = 0, this.len = e.length
					}
					var c, l = "undefined" != typeof Uint8Array ? function(e) {
						return e instanceof Uint8Array || Array.isArray(e) ? new s(e) : (
							"undefined" != typeof ArrayBuffer && e instanceof ArrayBuffer &&
							console.warn(""), new s(new Uint8Array(e)))
					} : function(e) {
						if (Array.isArray(e)) return new s(e)
					};

					function u() {
						var e = new o(0, 0),
							t = 0;
						if (!(this.len - this.pos > 4)) {
							for (; t < 3; ++t) {
								if (this.pos >= this.len) throw a(this);
								if (e.lo = (e.lo | (127 & this.buf[this.pos]) << 7 * t) >>> 0, this.buf[
										this.pos++] < 128) return e
							}
							return e.lo = (e.lo | (127 & this.buf[this.pos++]) << 7 * t) >>> 0, e
						}
						for (; t < 4; ++t)
							if (e.lo = (e.lo | (127 & this.buf[this.pos]) << 7 * t) >>> 0, this.buf[this
									.pos++] < 128) return e;
						if (e.lo = (e.lo | (127 & this.buf[this.pos]) << 28) >>> 0, e.hi = (e.hi | (
								127 & this.buf[this.pos]) >> 4) >>> 0, this.buf[this.pos++] < 128)
							return e;
						if (t = 0, this.len - this.pos > 4) {
							for (; t < 5; ++t)
								if (e.hi = (e.hi | (127 & this.buf[this.pos]) << 7 * t + 3) >>> 0, this
									.buf[this.pos++] < 128) return e
						} else
							for (; t < 5; ++t) {
								if (this.pos >= this.len) throw a(this);
								if (e.hi = (e.hi | (127 & this.buf[this.pos]) << 7 * t + 3) >>> 0, this
									.buf[this.pos++] < 128) return e
							}
						throw Error("invalid varint encoding")
					}

					function d(e, t) {
						return (e[t - 4] | e[t - 3] << 8 | e[t - 2] << 16 | e[t - 1] << 24) >>> 0
					}

					function p() {
						if (this.pos + 8 > this.len) throw a(this, 8);
						return new o(d(this.buf, this.pos += 4), d(this.buf, this.pos += 4))
					}
					s.create = i.Buffer ? function(e) {
							return (s.create = function(e) {
								return i.Buffer.isBuffer(e) ? new(void 0)(e) : l(e)
							})(e)
						} : l, s.prototype._slice = i.Array.prototype.subarray || i.Array.prototype
						.slice, s.prototype.uint32 = (c = 4294967295, function() {
							if (c = (127 & this.buf[this.pos]) >>> 0, this.buf[this.pos++] < 128)
								return c;
							if (c = (c | (127 & this.buf[this.pos]) << 7) >>> 0, this.buf[this
									.pos++] < 128) return c;
							if (c = (c | (127 & this.buf[this.pos]) << 14) >>> 0, this.buf[this
									.pos++] < 128) return c;
							if (c = (c | (127 & this.buf[this.pos]) << 21) >>> 0, this.buf[this
									.pos++] < 128) return c;
							if (c = (c | (15 & this.buf[this.pos]) << 28) >>> 0, this.buf[this
									.pos++] < 128) return c;
							if ((this.pos += 5) > this.len) throw this.pos = this.len, a(this, 10);
							return c
						}), s.prototype.int32 = function() {
							return 0 | this.uint32()
						}, s.prototype.sint32 = function() {
							var e = this.uint32();
							return e >>> 1 ^ -(1 & e) | 0
						}, s.prototype.bool = function() {
							return 0 !== this.uint32()
						}, s.prototype.fixed32 = function() {
							if (this.pos + 4 > this.len) throw a(this, 4);
							return d(this.buf, this.pos += 4)
						}, s.prototype.sfixed32 = function() {
							if (this.pos + 4 > this.len) throw a(this, 4);
							return 0 | d(this.buf, this.pos += 4)
						}, s.prototype.float = function() {
							if (this.pos + 4 > this.len) throw a(this, 4);
							var e = i.float.readFloatLE(this.buf, this.pos);
							return this.pos += 4, e
						}, s.prototype.double = function() {
							if (this.pos + 8 > this.len) throw a(this, 4);
							var e = i.float.readDoubleLE(this.buf, this.pos);
							return this.pos += 8, e
						}, s.prototype.bytes = function() {
							var e = this.uint32(),
								t = this.pos,
								r = this.pos + e;
							if (r > this.len) throw a(this, e);
							return this.pos += e, Array.isArray(this.buf) ? this.buf.slice(t, r) : t ===
								r ? new this.buf.constructor(0) : this._slice.call(this.buf, t, r)
						}, s.prototype.string = function() {
							var e = this.bytes();
							return n.read(e, 0, e.length)
						}, s.prototype.skip = function(e) {
							if ("number" == typeof e) {
								if (this.pos + e > this.len) throw a(this, e);
								this.pos += e
							} else
								do {
									if (this.pos >= this.len) throw a(this)
								} while (128 & this.buf[this.pos++]);
							return this
						}, s.prototype.skipType = function(e) {
							switch (e) {
								case 0:
									this.skip();
									break;
								case 1:
									this.skip(8);
									break;
								case 2:
									this.skip(this.uint32());
									break;
								case 3:
									for (; 4 != (e = 7 & this.uint32());) this.skipType(e);
									break;
								case 5:
									this.skip(4);
									break;
								default:
									throw Error("invalid wire type " + e + " at offset " + this.pos)
							}
							return this
						}, s._configure = function() {
							o = r(365), n = r(498);
							var e = i.Long ? "toLong" : "toNumber";
							i.merge(s.prototype, {
								int64: function() {
									return u.call(this)[e](!1)
								},
								uint64: function() {
									return u.call(this)[e](!0)
								},
								sint64: function() {
									return u.call(this).zzDecode()[e](!1)
								},
								fixed64: function() {
									return p.call(this)[e](!0)
								},
								sfixed64: function() {
									return p.call(this)[e](!1)
								}
							})
						}
				},
				685: function(e, t, r) {
					e.exports = d;
					var o = r(476);
					((d.prototype = Object.create(o.prototype)).constructor = d).className = "Root";
					var n, i, a, s = r(286),
						c = r(582),
						l = r(735),
						u = r(935);

					function d(e) {
						o.call(this, "", e), this.deferred = [], this.files = [], this.names = []
					}

					function p() {}
					d.fromJSON = function(e, t) {
							return e = "string" == typeof e ? JSON.parse(e) : e, t || (t = new d), e
								.options && t.setOptions(e.options), t.addJSON(e.nested)
						}, d.prototype.resolvePath = u.path.resolve, d.prototype.parseFromPbString =
						function e(t, r, o) {
							"function" == typeof r && (o = r, r = void 0);
							var n = this;
							if (!o) return u.asPromise(e, n, t, r);
							var s = null;
							if ("string" == typeof t) s = JSON.parse(t);
							else {
								if ("object" != typeof t) return void console.log("pb格式转化失败");
								s = t
							}

							function c(e, t) {
								if (o) {
									var r = o;
									o = null, r(e, t)
								}
							}

							function l(e, t) {
								try {
									if (u.isString(t) && "{" === t.charAt(0) && (t = JSON.parse(t)), u
										.isString(t)) {
										i.filename = e;
										var o, a = i(t, n, r),
											s = 0;
										if (a.imports)
											for (; s < a.imports.length; ++s) d(o = a.imports[s]);
										if (a.weakImports) {
											for (s = 0; s < a.weakImports.length; ++s) o = a
												.weakImports[s];
											d(o)
										}
									} else n.setOptions(t.options).addJSON(t.nested)
								} catch (e) {
									c(e)
								}
								c(null, n)
							}

							function d(e) {
								n.names.indexOf(e) > -1 || (n.names.push(e), e in a && l(e, a[e]))
							}
							l(s.name, s.pbJsonStr)
						}, d.prototype.load = function e(t, r, o) {
							"function" == typeof r && (o = r, r = void 0);
							var n = this;
							if (!o) return u.asPromise(e, n, t, r);
							var s = o === p;

							function c(e, t) {
								if (o) {
									var r = o;
									if (o = null, s) throw e;
									r(e, t)
								}
							}

							function l(e, t) {
								try {
									if (u.isString(t) && "{" === t.charAt(0) && (t = JSON.parse(t)), u
										.isString(t)) {
										i.filename = e;
										var o, a = i(t, n, r),
											l = 0;
										if (a.imports)
											for (; l < a.imports.length; ++l)(o = n.resolvePath(e, a
												.imports[l])) && d(o);
										if (a.weakImports)
											for (l = 0; l < a.weakImports.length; ++l)(o = n
												.resolvePath(e, a.weakImports[l])) && d(o, !0)
									} else n.setOptions(t.options).addJSON(t.nested)
								} catch (e) {
									c(e)
								}
								s || h || c(null, n)
							}

							function d(e, t) {
								var r = e.lastIndexOf("google/protobuf/");
								if (r > -1) {
									var i = e.substring(r);
									i in a && (e = i)
								}
								if (!(n.files.indexOf(e) > -1))
									if (n.files.push(e), e in a) s ? l(e, a[e]) : (++h, setTimeout((
										function() {
											--h, l(e, a[e])
										})));
									else if (s) {
									var d;
									try {
										d = u.fs.readFileSync(e).toString("utf8")
									} catch (e) {
										return void(t || c(e))
									}
									l(e, d)
								} else ++h, u.fetch(e, (function(r, i) {
									--h, o && (r ? t ? h || c(null, n) : c(r) : l(e, i))
								}))
							}
							var h = 0;
							u.isString(t) && (t = [t]);
							for (var f, m = 0; m < t.length; ++m)(f = n.resolvePath("", t[m])) && d(f);
							if (s) return n;
							h || c(null, n)
						}, d.prototype.loadSync = function(e, t) {
							if (!u.isNode) throw Error("not supported");
							return this.load(e, t, p)
						}, d.prototype.resolveAll = function() {
							if (this.deferred.length) throw Error("unresolvable extensions: " + this
								.deferred.map((function(e) {
									return "'extend " + e.extend + "' in " + e.parent
										.fullName
								})).join(", "));
							return o.prototype.resolveAll.call(this)
						};
					var h = /^[A-Z]/;

					function f(e, t) {
						var r = t.parent.lookup(t.extend);
						if (r) {
							var o = new s(t.fullName, t.id, t.type, t.rule, void 0, t.options);
							return o.declaringField = t, t.extensionField = o, r.add(o), !0
						}
						return !1
					}
					d.prototype._handleAdd = function(e) {
						if (e instanceof s) void 0 === e.extend || e.extensionField || f(0, e) ||
							this.deferred.push(e);
						else if (e instanceof c) h.test(e.name) && (e.parent[e.name] = e.values);
						else if (!(e instanceof l)) {
							if (e instanceof n)
								for (var t = 0; t < this.deferred.length;) f(0, this.deferred[t]) ?
									this.deferred.splice(t, 1) : ++t;
							for (var r = 0; r < e.nestedArray.length; ++r) this._handleAdd(e
								._nestedArray[r]);
							h.test(e.name) && (e.parent[e.name] = e)
						}
					}, d.prototype._handleRemove = function(e) {
						if (e instanceof s) {
							if (void 0 !== e.extend)
								if (e.extensionField) e.extensionField.parent.remove(e
									.extensionField), e.extensionField = null;
								else {
									var t = this.deferred.indexOf(e);
									t > -1 && this.deferred.splice(t, 1)
								}
						} else if (e instanceof c) h.test(e.name) && delete e.parent[e.name];
						else if (e instanceof o) {
							for (var r = 0; r < e.nestedArray.length; ++r) this._handleRemove(e
								._nestedArray[r]);
							h.test(e.name) && delete e.parent[e.name]
						}
					}, d._configure = function() {
						n = r(192), i = r(845), a = r(72), s = r(286), c = r(582), l = r(735), u =
							r(935)
					}
				},
				889: function(e) {
					e.exports = {}
				},
				325: function(e, t, r) {
					"use strict";
					e.exports = n;
					var o = r(935);

					function n(e, t, r) {
						if ("function" != typeof e) throw TypeError("rpcImpl must be a function");
						o.EventEmitter.call(this), this.rpcImpl = e, this.requestDelimited = Boolean(t),
							this.responseDelimited = Boolean(r)
					}(n.prototype = Object.create(o.EventEmitter.prototype)).constructor = n, n
						.prototype.rpcCall = function e(t, r, n, i, a) {
							if (!i) throw TypeError("request must be specified");
							var s = this;
							if (!a) return o.asPromise(e, s, t, r, n, i);
							if (s.rpcImpl) try {
								return s.rpcImpl(t, r[s.requestDelimited ? "encodeDelimited" :
									"encode"](i).finish(), (function(e, r) {
									if (e) return s.emit("error", e, t), a(e);
									if (null !== r) {
										if (!(r instanceof n)) try {
											r = n[s.responseDelimited ?
												"decodeDelimited" : "decode"](r)
										} catch (e) {
											return s.emit("error", e, t), a(e)
										}
										return s.emit("data", r, t), a(null, r)
									}
									s.end(!0)
								}))
							} catch (e) {
								return s.emit("error", e, t), void setTimeout((function() {
									a(e)
								}), 0)
							} else setTimeout((function() {
								a(Error("already ended"))
							}), 0)
						}, n.prototype.end = function(e) {
							return this.rpcImpl && (e || this.rpcImpl(null, null, null), this.rpcImpl =
								null, this.emit("end").off()), this
						}
				},
				447: function(e, t, r) {
					"use strict";
					e.exports = s;
					var o, n, i, a = r(476);

					function s(e, t) {
						a.call(this, e, t), this.methods = {}, this._methodsArray = null
					}

					function c(e) {
						return e._methodsArray = null, e
					}((s.prototype = Object.create(a.prototype)).constructor = s).className = "Service",
						s.fromJSON = function(e, t) {
							var r = new s(e, t.options);
							if (t.methods)
								for (var n = Object.keys(t.methods), i = 0; i < n.length; ++i) r.add(o
									.fromJSON(n[i], t.methods[n[i]]));
							return t.nested && r.addJSON(t.nested), r.comment = t.comment, r
						}, s.prototype.toJSON = function(e) {
							var t = a.prototype.toJSON.call(this, e),
								r = !!e && Boolean(e.keepComments);
							return n.toObject(["options", t && t.options || void 0, "methods", a
								.arrayToJSON(this.methodsArray, e) || {}, "nested", t && t
								.nested || void 0, "comment", r ? this.comment : void 0
							])
						}, Object.defineProperty(s.prototype, "methodsArray", {
							get: function() {
								return this._methodsArray || (this._methodsArray = n.toArray(
									this.methods))
							}
						}), s.prototype.get = function(e) {
							return this.methods[e] || a.prototype.get.call(this, e)
						}, s.prototype.resolveAll = function() {
							for (var e = this.methodsArray, t = 0; t < e.length; ++t) e[t].resolve();
							return a.prototype.resolve.call(this)
						}, s.prototype.add = function(e) {
							if (this.get(e.name)) throw Error("duplicate name '" + e.name + "' in " +
								this);
							return e instanceof o ? (this.methods[e.name] = e, e.parent = this, c(
								this)) : a.prototype.add.call(this, e)
						}, s.prototype.remove = function(e) {
							if (e instanceof o) {
								if (this.methods[e.name] !== e) throw Error(e + " is not a member of " +
									this);
								return delete this.methods[e.name], e.parent = null, c(this)
							}
							return a.prototype.remove.call(this, e)
						}, s.prototype.create = function(e, t, r) {
							for (var o, a = new i.Service(e, t, r), s = 0; s < this.methodsArray
								.length; ++s) {
								var c = n.lcFirst((o = this._methodsArray[s]).resolve().name).replace(
									/[^$\w_]/g, "");
								a[c] = n.codegen(["r", "c"], n.isReserved(c) ? c + "_" : c)(
									"return this.rpcCall(m,q,s,r,c)")({
									m: o,
									q: o.resolvedRequestType.ctor,
									s: o.resolvedResponseType.ctor
								})
							}
							return a
						}, s._configure = function() {
							o = r(484), n = r(935), i = r(325)
						}
				},
				869: function(e) {
					e.exports = d;
					var t = /[\s{}=;:[\],'"()<>]/g,
						r = /(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,
						o = /(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,
						n = /^ *[*/]+ */,
						i = /^\s*\*?\/*/,
						a = /\n/g,
						s = /\s/,
						c = /\\(.?)/g,
						l = {
							0: "\0",
							r: "\r",
							n: "\n",
							t: "\t"
						};

					function u(e) {
						return e.replace(c, (function(e, t) {
							switch (t) {
								case "\\":
								case "":
									return t;
								default:
									return l[t] || ""
							}
						}))
					}

					function d(e, c) {
						e = e.toString();
						var l = 0,
							d = e.length,
							p = 1,
							h = null,
							f = null,
							m = 0,
							g = !1,
							E = [],
							y = null;

						function v(e) {
							return Error("illegal " + e + " (line " + p + ")")
						}

						function _(t) {
							return e.charAt(t)
						}

						function T(t, r) {
							h = e.charAt(t++), m = p, g = !1;
							var o, s = t - (c ? 2 : 3);
							do {
								if (--s < 0 || "\n" === (o = e.charAt(s))) {
									g = !0;
									break
								}
							} while (" " === o || "\t" === o);
							for (var l = e.substring(t, r).split(a), u = 0; u < l.length; ++u) l[u] = l[
								u].replace(c ? i : n, "").trim();
							f = l.join("\n").trim()
						}

						function R(t) {
							var r = O(t),
								o = e.substring(t, r);
							return /^\s*\/{1,2}/.test(o)
						}

						function O(e) {
							for (var t = e; t < d && "\n" !== _(t);) t++;
							return t
						}

						function I() {
							if (E.length > 0) return E.shift();
							if (y) return function() {
								var t = "'" === y ? o : r;
								t.lastIndex = l - 1;
								var n = t.exec(e);
								if (!n) throw v("string");
								return l = t.lastIndex, S(y), y = null, u(n[1])
							}();
							var n, i, a, h, f;
							do {
								if (l === d) return null;
								for (n = !1; s.test(a = _(l));)
									if ("\n" === a && ++p, ++l === d) return null;
								if ("/" === _(l)) {
									if (++l === d) throw v("comment");
									if ("/" === _(l))
										if (c) {
											if (h = l, f = !1, R(l)) {
												f = !0;
												do {
													if ((l = O(l)) === d) break;
													l++
												} while (R(l))
											} else l = Math.min(d, O(l) + 1);
											f && T(h, l), p++, n = !0
										} else {
											for (f = "/" === _(h = l + 1);
												"\n" !== _(++l);)
												if (l === d) return null;
											++l, f && T(h, l - 1), ++p, n = !0
										}
									else {
										if ("*" !== (a = _(l))) return "/";
										h = l + 1, f = c || "*" === _(h);
										do {
											if ("\n" === a && ++p, ++l === d) throw v("comment");
											i = a, a = _(l)
										} while ("*" !== i || "/" !== a);
										++l, f && T(h, l - 2), n = !0
									}
								}
							} while (n);
							var m = l;
							if (t.lastIndex = 0, !t.test(_(m++)))
								for (; m < d && !t.test(_(m));) ++m;
							var g = e.substring(l, l = m);
							return '"' !== g && "'" !== g || (y = g), g
						}

						function S(e) {
							E.push(e)
						}

						function C() {
							if (!E.length) {
								var e = I();
								if (null === e) return null;
								S(e)
							}
							return E[0]
						}
						return Object.defineProperty({
							next: I,
							peek: C,
							push: S,
							skip: function(e, t) {
								var r = C();
								if (r === e) return I(), !0;
								if (!t) throw v("token '" + r + "', '" + e + "' expected");
								return !1
							},
							cmnt: function(e) {
								var t = null;
								return void 0 === e ? m === p - 1 && (c || "*" === h ||
									g) && (t = f) : (m < e && C(), m !== e || g || !c &&
										"/" !== h || (t = f)), t
							}
						}, "line", {
							get: function() {
								return p
							}
						})
					}
					d.unescape = u
				},
				192: function(e, t, r) {
					e.exports = y;
					var o, n, i, a, s, c, l, u, d, p, h, f, m, g, E = r(476);

					function y(e, t) {
						E.call(this, e, t), this.fields = {}, this.oneofs = void 0, this.extensions =
							void 0, this.reserved = void 0, this.group = void 0, this._fieldsById =
							null, this._fieldsArray = null, this._oneofsArray = null, this._ctor = null
					}

					function v(e) {
						return e._fieldsById = e._fieldsArray = e._oneofsArray = null, delete e.encode,
							delete e.decode, delete e.verify, e
					}((y.prototype = Object.create(E.prototype)).constructor = y).className = "Type",
						Object.defineProperties(y.prototype, {
							fieldsById: {
								get: function() {
									if (this._fieldsById) return this._fieldsById;
									this._fieldsById = {};
									for (var e = Object.keys(this.fields), t = 0; t < e
										.length; ++t) {
										var r = this.fields[e[t]],
											o = r.id;
										if (this._fieldsById[o]) throw Error("duplicate id " +
											o + " in " + this);
										this._fieldsById[o] = r
									}
									return this._fieldsById
								}
							},
							fieldsArray: {
								get: function() {
									return this._fieldsArray || (this._fieldsArray = l.toArray(
										this.fields))
								}
							},
							oneofsArray: {
								get: function() {
									return this._oneofsArray || (this._oneofsArray = l.toArray(
										this.oneofs))
								}
							},
							ctor: {
								get: function() {
									return this._ctor || (this.ctor = y.generateConstructor(
										this))
								},
								set: function(e) {
									var t = e.prototype;
									t instanceof i || ((e.prototype = new i).constructor = e, l
											.merge(e.prototype, t)), e.$type = e.prototype
										.$type = this, l.merge(e, i, !0), l.merge(e.prototype,
											i, !0), this._ctor = e;
									for (var r = 0; r < this.fieldsArray.length; ++r) this
										._fieldsArray[r].resolve();
									var o = {};
									for (r = 0; r < this.oneofsArray.length; ++r) {
										var n = this._oneofsArray[r].resolve().name,
											a = function(e) {
												for (var t = {}, r = 0; r < e.length; ++r) t[e[
													r]] = 0;
												return {
													setter: function(r) {
														if (!(e.indexOf(r) < 0)) {
															t[r] = 1;
															for (var o = 0; o < e.length; ++
																o) e[o] !== r &&
																delete this[e[o]]
														}
													},
													getter: function() {
														for (var e = Object.keys(this), r =
																e.length - 1; r > -1; --r)
															if (1 === t[e[r]] && void 0 !==
																this[e[r]] && null !== this[
																	e[r]]) return e[r]
													}
												}
											}(this._oneofsArray[r].oneof);
										o[n] = {
											get: a.getter,
											set: a.setter
										}
									}
									r && Object.defineProperties(e.prototype, o)
								}
							}
						}), y.generateConstructor = function(e) {
							return function(t) {
								for (var r, o = 0; o < e.fieldsArray.length; o++)(r = e
									._fieldsArray[o]).map ? this[r.name] = {} : r.repeated && (
									this[r.name] = []);
								if (t)
									for (var n = Object.keys(t), i = 0; i < n.length; ++i) null !=
										t[n[i]] && (this[n[i]] = t[n[i]])
							}
						}, y.fromJSON = function(e, t) {
							var r = new y(e, t.options);
							r.extensions = t.extensions, r.reserved = t.reserved;
							for (var i = Object.keys(t.fields), s = 0; s < i.length; ++s) r.add((
								void 0 !== t.fields[i[s]].keyType ? g.fromJSON : n.fromJSON)(i[
								s], t.fields[i[s]]));
							if (t.oneofs)
								for (i = Object.keys(t.oneofs), s = 0; s < i.length; ++s) r.add(a
									.fromJSON(i[s], t.oneofs[i[s]]));
							if (t.nested)
								for (i = Object.keys(t.nested), s = 0; s < i.length; ++s) {
									var c = t.nested[i[s]];
									r.add((void 0 !== c.id ? n.fromJSON : void 0 !== c.fields ? y
											.fromJSON : void 0 !== c.values ? o.fromJSON :
											void 0 !== c.methods ? h.fromJSON : E.fromJSON)(i[s],
										c))
								}
							return t.extensions && t.extensions.length && (r.extensions = t.extensions),
								t.reserved && t.reserved.length && (r.reserved = t.reserved), t.group &&
								(r.group = !0), t.comment && (r.comment = t.comment), r
						}, y.prototype.toJSON = function(e) {
							var t = E.prototype.toJSON.call(this, e),
								r = !!e && Boolean(e.keepComments);
							return {
								options: t && t.options || void 0,
								oneofs: E.arrayToJSON(this.oneofsArray, e),
								fields: E.arrayToJSON(this.fieldsArray.filter((function(e) {
									return !e.declaringField
								})), e) || {},
								extensions: this.extensions && this.extensions.length ? this
									.extensions : void 0,
								reserved: this.reserved && this.reserved.length ? this.reserved :
									void 0,
								group: this.group || void 0,
								nested: t && t.nested || void 0,
								comment: r ? this.comment : void 0
							}
						}, y.prototype.resolveAll = function() {
							for (var e = this.fieldsArray, t = 0; t < e.length;) e[t++].resolve();
							var r = this.oneofsArray;
							for (t = 0; t < r.length;) r[t++].resolve();
							return E.prototype.resolveAll.call(this)
						}, y.prototype.get = function(e) {
							return this.fields[e] || this.oneofs && this.oneofs[e] || this.nested &&
								this.nested[e] || null
						}, y.prototype.add = function(e) {
							if (this.get(e.name)) throw Error("duplicate name '" + e.name + "' in " +
								this);
							if (e instanceof n && void 0 === e.extend) {
								if (this._fieldsById && this._fieldsById[e.id]) throw Error(
									"duplicate id " + e.id + " in " + this);
								if (this.isReservedId(e.id)) throw Error("id " + e.id +
									" is reserved in " + this);
								if (this.isReservedName(e.name)) throw Error("name '" + e.name +
									"' is reserved in " + this);
								return e.parent && e.parent.remove(e), this.fields[e.name] = e, e
									.message = this, e.onAdd(this), v(this)
							}
							return e instanceof a ? (this.oneofs || (this.oneofs = {}), this.oneofs[e
								.name] = e, e.onAdd(this), v(this)) : E.prototype.add.call(this, e)
						}, y.prototype.remove = function(e) {
							if (e instanceof n && void 0 === e.extend) {
								if (!this.fields || this.fields[e.name] !== e) throw Error(e +
									" is not a member of " + this);
								return delete this.fields[e.name], e.parent = null, e.onRemove(this), v(
									this)
							}
							if (e instanceof a) {
								if (!this.oneofs || this.oneofs[e.name] !== e) throw Error(e +
									" is not a member of " + this);
								return delete this.oneofs[e.name], e.parent = null, e.onRemove(this), v(
									this)
							}
							return E.prototype.remove.call(this, e)
						}, y.prototype.isReservedId = function(e) {
							return E.isReservedId(this.reserved, e)
						}, y.prototype.isReservedName = function(e) {
							return E.isReservedName(this.reserved, e)
						}, y.prototype.create = function(e) {
							return new this.ctor(e)
						}, y.prototype.setup = function() {
							for (var e = this.fullName, t = [], r = 0; r < this.fieldsArray.length; ++r)
								t.push(this._fieldsArray[r].resolve().resolvedType);
							this.encode = d(this)({
								Writer: s,
								types: t,
								util: l
							}), this.decode = p(this)({
								Reader: c,
								types: t,
								util: l
							}), this.verify = u(this)({
								types: t,
								util: l
							}), this.fromObject = m.fromObject(this)({
								types: t,
								util: l
							}), this.toObject = m.toObject(this)({
								types: t,
								util: l
							});
							var o = f[e];
							if (o) {
								var n = Object.create(this);
								n.fromObject = this.fromObject, this.fromObject = o.fromObject.bind(n),
									n.toObject = this.toObject, this.toObject = o.toObject.bind(n)
							}
							return this
						}, y.prototype.encode = function(e, t) {
							return this.setup().encode(e, t)
						}, y.prototype.encodeDelimited = function(e, t) {
							return this.encode(e, t && t.len ? t.fork() : t).ldelim()
						}, y.prototype.decode = function(e, t) {
							return this.setup().decode(e, t)
						}, y.prototype.decodeDelimited = function(e) {
							return e instanceof c || (e = c.create(e)), this.decode(e, e.uint32())
						}, y.prototype.verify = function(e) {
							return this.setup().verify(e)
						}, y.prototype.fromObject = function(e) {
							return this.setup().fromObject(e)
						}, y.prototype.toObject = function(e, t) {
							return this.setup().toObject(e, t)
						}, y.d = function(e) {
							return function(t) {
								l.decorateType(t, e)
							}
						}, y._configure = function() {
							o = r(582), n = r(286), i = r(339), a = r(735), s = r(244), c = r(494), l =
								r(935), u = r(216), d = r(929), p = r(888), h = r(447), f = r(834), m =
								r(525), g = r(435)
						}
				},
				696: function(e, t, r) {
					"use strict";
					var o = e.exports,
						n = r(935),
						i = ["double", "float", "int32", "uint32", "sint32", "fixed32", "sfixed32",
							"int64", "uint64", "sint64", "fixed64", "sfixed64", "bool", "string",
							"bytes"
						];

					function a(e, t) {
						var r = 0,
							o = {};
						for (t |= 0; r < e.length;) o[i[r + t]] = e[r++];
						return o
					}
					o.basic = a([1, 5, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0, 2, 2]), o.defaults = a([0, 0, 0,
							0, 0, 0, 0, 0, 0, 0, 0, 0, !1, "", n.emptyArray, null
						]), o.long = a([0, 0, 0, 1, 1], 7), o.mapKey = a([0, 0, 0, 5, 5, 0, 0, 0, 1, 1,
							0, 2
						], 2), o.packed = a([1, 5, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0]), o._configure =
						function() {
							n = r(935)
						}
				},
				498: function(e) {
					"use strict";
					var t = e.exports;
					t.length = function(e) {
						for (var t = 0, r = 0, o = 0; o < e.length; ++o)(r = e.charCodeAt(o)) <
							128 ? t += 1 : r < 2048 ? t += 2 : 55296 == (64512 & r) && 56320 == (
								64512 & e.charCodeAt(o + 1)) ? (++o, t += 4) : t += 3;
						return t
					}, t.read = function(e, t, r) {
						if (r - t < 1) return "";
						for (var o, n = null, i = [], a = 0; t < r;)(o = e[t++]) < 128 ? i[a++] =
							o : o > 191 && o < 224 ? i[a++] = (31 & o) << 6 | 63 & e[t++] : o >
							239 && o < 365 ? (o = ((7 & o) << 18 | (63 & e[t++]) << 12 | (63 & e[
									t++]) << 6 | 63 & e[t++]) - 65536, i[a++] = 55296 + (o >> 10),
								i[a++] = 56320 + (1023 & o)) : i[a++] = (15 & o) << 12 | (63 & e[
								t++]) << 6 | 63 & e[t++], a > 8191 && ((n || (n = [])).push(String
								.fromCharCode.apply(String, i)), a = 0);
						return n ? (a && n.push(String.fromCharCode.apply(String, i.slice(0, a))), n
							.join("")) : String.fromCharCode.apply(String, i.slice(0, a))
					}, t.write = function(e, t, r) {
						for (var o, n, i = r, a = 0; a < e.length; ++a)(o = e.charCodeAt(a)) < 128 ?
							t[r++] = o : o < 2048 ? (t[r++] = o >> 6 | 192, t[r++] = 63 & o | 128) :
							55296 == (64512 & o) && 56320 == (64512 & (n = e.charCodeAt(a + 1))) ? (
								o = 65536 + ((1023 & o) << 10) + (1023 & n), ++a, t[r++] = o >> 18 |
								240, t[r++] = o >> 12 & 63 | 128, t[r++] = o >> 6 & 63 | 128, t[
								r++] = 63 & o | 128) : (t[r++] = o >> 12 | 224, t[r++] = o >> 6 &
								63 | 128, t[r++] = 63 & o | 128);
						return r - i
					}
				},
				935: function(e, t, r) {
					var o = e.exports,
						n = r(889);
					o.LongBits = r(365), o.Long = r(939), o.pool = r(997), o.float = r(283), o
						.asPromise = r(728), o.EventEmitter = r(969), o.path = r(444), o.base64 = r(
						440), o.utf8 = r(498), o.compareFieldsById = function(e, t) {
							return e.id - t.id
						}, o.toArray = function(e) {
							if (e) {
								for (var t = Object.keys(e), r = new Array(t.length), o = 0; o < t
									.length;) r[o] = e[t[o++]];
								return r
							}
							return []
						}, o.toObject = function(e) {
							for (var t = {}, r = 0; r < e.length;) {
								var o = e[r++],
									n = e[r++];
								void 0 !== n && (t[o] = n)
							}
							return t
						}, o.isString = function(e) {
							return "string" == typeof e || e instanceof String
						}, o.isReserved = function(e) {
							return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/
								.test(e)
						}, o.isObject = function(e) {
							return e && "object" == typeof e
						}, o.Array = "undefined" != typeof Uint8Array ? Uint8Array : Array, o
						.oneOfGetter = function(e) {
							for (var t = {}, r = 0; r < e.length; ++r) t[e[r]] = 1;
							return function() {
								for (var e = Object.keys(this), r = e.length - 1; r > -1; --r)
									if (1 === t[e[r]] && void 0 !== this[e[r]] && null !== this[e[
											r]]) return e[r]
							}
						}, o.oneOfSetter = function(e) {
							return function(t) {
								for (var r = 0; r < e.length; ++r) e[r] !== t && delete this[e[r]]
							}
						}, o.merge = function(e, t, r) {
							for (var o = Object.keys(t), n = 0; n < o.length; ++n) void 0 !== e[o[n]] &&
								r || (e[o[n]] = t[o[n]]);
							return e
						}, o.decorateType = function(e, t) {
							if (e.$type) return t && e.$type.name !== t && (o.decorateRoot.remove(e
								.$type), e.$type.name = t, o.decorateRoot.add(e.$type)), e.$type;
							Type || (Type = r(192));
							var n = new Type(t || e.name);
							return o.decorateRoot.add(n), n.ctor = e, Object.defineProperty(e,
							"$type", {
								value: n,
								enumerable: !1
							}), Object.defineProperty(e.prototype, "$type", {
								value: n,
								enumerable: !1
							}), n
						}, o.emptyArray = Object.freeze ? Object.freeze([]) : [], o.emptyObject = Object
						.freeze ? Object.freeze({}) : {}, o.longToHash = function(e) {
							return e ? o.LongBits.from(e).toHash() : o.LongBits.zeroHash
						}, o.copy = function(e) {
							if ("object" != typeof e) return e;
							var t = {};
							for (var r in e) t[r] = e[r];
							return t
						}, o.deepCopy = function e(t) {
							if ("object" != typeof t) return t;
							var r = {};
							for (var o in t) r[o] = e(t[o]);
							return r
						}, o.ProtocolError = function(e) {
							function t(e, r) {
								if (!(this instanceof t)) return new t(e, r);
								Object.defineProperty(this, "message", {
										get: function() {
											return e
										}
									}), Error.captureStackTrace ? Error.captureStackTrace(this, t) :
									Object.defineProperty(this, "stack", {
										value: (new Error).stack || ""
									}), r && merge(this, r)
							}
							return (t.prototype = Object.create(Error.prototype)).constructor = t,
								Object.defineProperty(t.prototype, "name", {
									get: function() {
										return e
									}
								}), t.prototype.toString = function() {
									return this.name + ": " + this.message
								}, t
						}, o.toJSONOptions = {
							longs: String,
							enums: String,
							bytes: String,
							json: !0
						}, o.Buffer = null, o.newBuffer = function(e) {
							return "number" == typeof e ? new o.Array(e) : "undefined" ==
								typeof Uint8Array ? e : new Uint8Array(e)
						}, o.stringToBytes = function(e) {
							var t, r, o = [];
							t = e.length;
							for (var n = 0; n < t; n++)(r = e.charCodeAt(n)) >= 65536 && r <= 1114111 ?
								(o.push(r >> 18 & 7 | 240), o.push(r >> 12 & 63 | 128), o.push(r >> 6 &
									63 | 128), o.push(63 & r | 128)) : r >= 2048 && r <= 65535 ? (o
									.push(r >> 12 & 15 | 224), o.push(r >> 6 & 63 | 128), o.push(63 &
										r | 128)) : r >= 128 && r <= 2047 ? (o.push(r >> 6 & 31 | 192),
									o.push(63 & r | 128)) : o.push(255 & r);
							return o
						}, o.byteToString = function(e) {
							if ("string" == typeof e) return e;
							for (var t = "", r = e, o = 0; o < r.length; o++) {
								var n = r[o].toString(2),
									i = n.match(/^1+?(?=0)/);
								if (i && 8 == n.length) {
									for (var a = i[0].length, s = r[o].toString(2).slice(7 - a), c =
										1; c < a; c++) s += r[c + o].toString(2).slice(2);
									t += String.fromCharCode(parseInt(s, 2)), o += a - 1
								} else t += String.fromCharCode(r[o])
							}
							return t
						}, o.isInteger = Number.isInteger || function(e) {
							return "number" == typeof e && isFinite(e) && Math.floor(e) === e
						}, Object.defineProperty(o, "decorateRoot", {
							get: function() {
								return n.decorated || (n.decorated = new(r(685)))
							}
						})
				},
				216: function(e, t, r) {
					var o, n;

					function i(e, t) {
						return e.name + ": " + t + (e.repeated && "array" !== t ? "[]" : e.map &&
							"object" !== t ? "{k:" + e.keyType + "}" : "") + " expected"
					}

					function a(e, t, r, a) {
						var s = a.types;
						if (e.resolvedType)
							if (e.resolvedType instanceof o) {
								if (Object.keys(e.resolvedType.values).indexOf(r) < 0) return i(e,
									"enum value")
							} else {
								var c = s[t].verify(r);
								if (c) return e.name + "." + c
							}
						else switch (e.type) {
							case "int32":
							case "uint32":
							case "sint32":
							case "fixed32":
							case "sfixed32":
								if (!n.isInteger(r)) return i(e, "integer");
								break;
							case "int64":
							case "uint64":
							case "sint64":
							case "fixed64":
							case "sfixed64":
								if (!(n.isInteger(r) || r && n.isInteger(r.low) && n.isInteger(r
										.high))) return i(e, "integer|Long");
								break;
							case "float":
							case "double":
								if ("number" != typeof r) return i(e, "number");
								break;
							case "bool":
								if ("boolean" != typeof r) return i(e, "boolean");
								break;
							case "string":
								if (!n.isString(r)) return i(e, "string");
								break;
							case "bytes":
								if (!(r && "number" == typeof r.length || n.isString(r))) return i(
									e, "buffer")
						}
					}

					function s(e, t) {
						switch (e.keyType) {
							case "int32":
							case "uint32":
							case "sint32":
							case "fixed32":
							case "sfixed32":
								if (!n.key32Re.test(t)) return i(e, "integer key");
								break;
							case "int64":
							case "uint64":
							case "sint64":
							case "fixed64":
							case "sfixed64":
								if (!n.key64Re.test(t)) return i(e, "integer|Long key");
								break;
							case "bool":
								if (!n.key2Re.test(t)) return i(e, "boolean key")
						}
					}

					function c(e) {
						return function(t) {
							return function(r) {
								var o;
								if ("object" != typeof r || null === r)
							return "object expected";
								var c, l = {};
								e.oneofsArray.length && (c = {});
								for (var u = 0; u < e.fieldsArray.length; ++u) {
									var d, p = e._fieldsArray[u].resolve(),
										h = r[p.name];
									if (!p.optional || null != h && r.hasOwnProperty(p.name))
										if (p.map) {
											if (!n.isObject(h)) return i(p, "object");
											var f = Object.keys(h);
											for (d = 0; d < f.length; ++d) {
												if (o = s(p, f[d])) return o;
												if (o = a(p, u, h[f[d]], t)) return o
											}
										} else if (p.repeated) {
										if (!Array.isArray(h)) return i(p, "array");
										for (d = 0; d < h.length; ++d)
											if (o = a(p, u, h[d], t)) return o
									} else {
										if (p.partOf) {
											var m = p.partOf.name;
											if (1 === l[p.partOf.name] && 1 === c[m]) return p
												.partOf.name + ": multiple values";
											c[m] = 1
										}
										if (o = a(p, u, h, t)) return o
									}
								}
							}
						}
					}
					e.exports = c, c._configure = function() {
						o = r(582), n = r(935)
					}
				},
				834: function(e, t, r) {
					var o, n = t;
					n[".google.protobuf.Any"] = {
						fromObject: function(e) {
							if (e && e["@type"]) {
								var t = this.lookup(e["@type"]);
								if (t) {
									var r = "." === e["@type"].charAt(0) ? e["@type"].substr(
										1) : e["@type"];
									return this.create({
										type_url: "/" + r,
										value: t.encode(t.fromObject(e)).finish()
									})
								}
							}
							return this.fromObject(e)
						},
						toObject: function(e, t) {
							if (t && t.json && e.type_url && e.value) {
								var r = e.type_url.substring(e.type_url.lastIndexOf("/") + 1),
									n = this.lookup(r);
								n && (e = n.decode(e.value))
							}
							if (!(e instanceof this.ctor) && e instanceof o) {
								var i = e.$type.toObject(e, t);
								return i["@type"] = e.$type.fullName, i
							}
							return this.toObject(e, t)
						}
					}, n._configure = function() {
						o = r(339)
					}
				},
				244: function(e, t, r) {
					e.exports = l;
					var o, n = r(935),
						i = r(498);

					function a(e, t, r) {
						this.fn = e, this.len = t, this.next = void 0, this.val = r
					}

					function s() {}

					function c(e) {
						this.head = e.head, this.tail = e.tail, this.len = e.len, this.next = e.states
					}

					function l() {
						this.len = 0, this.head = new a(s, 0, 0), this.tail = this.head, this.states =
							null
					}

					function u(e, t, r) {
						t[r] = 255 & e
					}

					function d(e, t) {
						this.len = e, this.next = void 0, this.val = t
					}

					function p(e, t, r) {
						for (; e.hi;) t[r++] = 127 & e.lo | 128, e.lo = (e.lo >>> 7 | e.hi << 25) >>> 0,
							e.hi >>>= 7;
						for (; e.lo > 127;) t[r++] = 127 & e.lo | 128, e.lo = e.lo >>> 7;
						t[r++] = e.lo
					}

					function h(e, t, r) {
						t[r] = 255 & e, t[r + 1] = e >>> 8 & 255, t[r + 2] = e >>> 16 & 255, t[r + 3] =
							e >>> 24
					}
					l.create = n.Buffer ? function() {
							return (l.create = function() {
								return new(void 0)
							})()
						} : function() {
							return new l
						}, l.alloc = function(e) {
							return new n.Array(e)
						}, n.Array !== Array && (l.alloc = n.pool(l.alloc, n.Array.prototype.subarray)),
						l.prototype._push = function(e, t, r) {
							return this.tail = this.tail.next = new a(e, t, r), this.len += t, this
						}, d.prototype = Object.create(a.prototype), d.prototype.fn = function(e, t,
						r) {
							for (; e > 127;) t[r++] = 127 & e | 128, e >>>= 7;
							t[r] = e
						}, l.prototype.uint32 = function(e) {
							return this.len += (this.tail = this.tail.next = new d((e >>>= 0) < 128 ?
									1 : e < 16384 ? 2 : e < 2097152 ? 3 : e < 268435456 ? 4 : 5, e))
								.len, this
						}, l.prototype.int32 = function(e) {
							return e < 0 ? this._push(p, 10, o.fromNumber(e)) : this.uint32(e)
						}, l.prototype.sint32 = function(e) {
							return this.uint32((e << 1 ^ e >> 31) >>> 0)
						}, l.prototype.uint64 = function(e) {
							var t = o.from(e);
							return this._push(p, t.length(), t)
						}, l.prototype.int64 = l.prototype.uint64, l.prototype.sint64 = function(e) {
							var t = o.from(e).zzEncode();
							return this._push(p, t.length(), t)
						}, l.prototype.bool = function(e) {
							return this._push(u, 1, e ? 1 : 0)
						}, l.prototype.fixed32 = function(e) {
							return this._push(h, 4, e >>> 0)
						}, l.prototype.sfixed32 = l.prototype.fixed32, l.prototype.fixed64 = function(
						e) {
							var t = o.from(e);
							return this._push(h, 4, t.lo)._push(h, 4, t.hi)
						}, l.prototype.sfixed64 = l.prototype.fixed64, l.prototype.float = function(e) {
							return this._push(n.float.writeFloatLE, 4, e)
						}, l.prototype.double = function(e) {
							return this._push(n.float.writeDoubleLE, 8, e)
						};
					var f = n.Array.prototype.set ? function(e, t, r) {
						t.set(e, r)
					} : function(e, t, r) {
						for (var o = 0; o < e.length; ++o) t[r + o] = e[o]
					};
					l.prototype.bytes = function(e) {
						var t = e.length >>> 0;
						if (!t) return this._push(u, 1, 0);
						if (n.isString(e)) {
							var r = l.alloc(t = i.length(e));
							i.write(e, r, 0), e = r
						}
						return this.uint32(t)._push(f, t, e)
					}, l.prototype.string = function(e) {
						var t = i.length(e);
						return t ? this.uint32(t)._push(i.write, t, e) : this._push(u, 1, 0)
					}, l.prototype.fork = function() {
						return this.states = new c(this), this.head = this.tail = new a(s, 0, 0),
							this.len = 0, this
					}, l.prototype.reset = function() {
						return this.states ? (this.head = this.states.head, this.tail = this.states
								.tail, this.len = this.states.len, this.states = this.states.next) :
							(this.head = this.tail = new a(s, 0, 0), this.len = 0), this
					}, l.prototype.ldelim = function() {
						var e = this.head,
							t = this.tail,
							r = this.len;
						return this.reset().uint32(r), r && (this.tail.next = e.next, this.tail = t,
							this.len += r), this
					}, l.prototype.finish = function() {
						for (var e = this.head.next, t = this.constructor.alloc(this.len), r =
							0; e;) e.fn(e.val, t, r), r += e.len, e = e.next;
						return t
					}, l._configure = function() {
						o = r(365), r(440), i = r(498)
					}
				}
			},
			t = {};

		function r(o) {
			var n = t[o];
			if (void 0 !== n) return n.exports;
			var i = t[o] = {
				exports: {}
			};
			return e[o](i, i.exports, r), i.exports
		}
		r.amdO = {}, r.n = function(e) {
			var t = e && e.__esModule ? function() {
				return e.default
			} : function() {
				return e
			};
			return r.d(t, {
				a: t
			}), t
		}, r.d = function(e, t) {
			for (var o in t) r.o(t, o) && !r.o(e, o) && Object.defineProperty(e, o, {
				enumerable: !0,
				get: t[o]
			})
		}, r.g = function() {
			if ("object" == typeof globalThis) return globalThis;
			try {
				return this || new Function("return this")()
			} catch (e) {
				if ("object" == typeof window) return window
			}
		}(), r.o = function(e, t) {
			return Object.prototype.hasOwnProperty.call(e, t)
		}, r.r = function(e) {
			"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol
				.toStringTag, {
					value: "Module"
				}), Object.defineProperty(e, "__esModule", {
				value: !0
			})
		};
		var o = {};
		return function() {
			"use strict";
			r.r(o), r.d(o, {
				default: function() {
					return as
				}
			});
			var e = {};
			r.r(e), r.d(e, {
				acceptContactInvite: function() {
					return qr
				},
				acceptInvitation: function() {
					return Kr
				},
				addContact: function() {
					return jr
				},
				addConversationMark: function() {
					return yo
				},
				addReaction: function() {
					return ro
				},
				addToBlackList: function() {
					return Jr
				},
				addUsersToBlacklist: function() {
					return Xr
				},
				addUsersToBlocklist: function() {
					return Yr
				},
				declineContactInvite: function() {
					return Vr
				},
				declineInvitation: function() {
					return zr
				},
				deleteAllMessagesAndConversations: function() {
					return Ro
				},
				deleteContact: function() {
					return Wr
				},
				deleteConversation: function() {
					return Pr
				},
				deleteReaction: function() {
					return oo
				},
				deleteSession: function() {
					return Ur
				},
				fetchHistoryMessages: function() {
					return Gr
				},
				fetchUserInfoById: function() {
					return Lr
				},
				getAllContacts: function() {
					return mo
				},
				getBlacklist: function() {
					return Rr
				},
				getBlocklist: function() {
					return Or
				},
				getContacts: function() {
					return Sr
				},
				getContactsWithCursor: function() {
					return go
				},
				getConversationlist: function() {
					return Mr
				},
				getHistoryMessages: function() {
					return Hr
				},
				getReactionDetail: function() {
					return ao
				},
				getReactionList: function() {
					return no
				},
				getReactionlist: function() {
					return io
				},
				getRoster: function() {
					return Ir
				},
				getSelfIdsOnOtherPlatform: function() {
					return To
				},
				getServerConversations: function() {
					return lo
				},
				getServerConversationsByFilter: function() {
					return _o
				},
				getServerPinnedConversations: function() {
					return po
				},
				getServerPinnedMessages: function() {
					return Co
				},
				getSessionList: function() {
					return Nr
				},
				getTokenExpireTimestamp: function() {
					return xr
				},
				modifyMessage: function() {
					return to
				},
				pinConversation: function() {
					return ho
				},
				pinMessage: function() {
					return Io
				},
				recallMessage: function() {
					return eo
				},
				removeConversationMark: function() {
					return vo
				},
				removeFromBlackList: function() {
					return Qr
				},
				removeHistoryMessages: function() {
					return co
				},
				removeRoster: function() {
					return Fr
				},
				removeUserFromBlackList: function() {
					return $r
				},
				removeUserFromBlocklist: function() {
					return Zr
				},
				reportMessage: function() {
					return so
				},
				setContactRemark: function() {
					return fo
				},
				unpinMessage: function() {
					return So
				},
				updateCurrentUserNick: function() {
					return Dr
				},
				updateOwnUserInfo: function() {
					return kr
				},
				updateUserInfo: function() {
					return wr
				},
				uploadPushToken: function() {
					return Ar
				},
				uploadToken: function() {
					return Cr
				}
			});
			var t = {};
			r.r(t), r.d(t, {
				acceptGroupInvite: function() {
					return sn
				},
				acceptGroupJoinRequest: function() {
					return rn
				},
				addUsersToGroupAllowlist: function() {
					return Ln
				},
				addUsersToGroupWhitelist: function() {
					return wn
				},
				agreeInviteIntoGroup: function() {
					return an
				},
				agreeJoinGroup: function() {
					return tn
				},
				blockGroup: function() {
					return Uo
				},
				blockGroupMember: function() {
					return Rn
				},
				blockGroupMembers: function() {
					return In
				},
				blockGroupMessages: function() {
					return Po
				},
				changeGroupOwner: function() {
					return Go
				},
				changeOwner: function() {
					return xo
				},
				createGroup: function() {
					return bo
				},
				createGroupNew: function() {
					return Mo
				},
				deleteGroupSharedFile: function() {
					return Xn
				},
				destroyGroup: function() {
					return Xo
				},
				disableSendGroupMsg: function() {
					return Pn
				},
				dissolveGroup: function() {
					return Jo
				},
				downloadGroupSharedFile: function() {
					return $n
				},
				enableSendGroupMsg: function() {
					return kn
				},
				fetchGroupAnnouncement: function() {
					return zn
				},
				fetchGroupSharedFileList: function() {
					return Yn
				},
				getGroup: function() {
					return Lo
				},
				getGroupAdmin: function() {
					return Wo
				},
				getGroupAllowlist: function() {
					return Hn
				},
				getGroupBlacklist: function() {
					return bn
				},
				getGroupBlacklistNew: function() {
					return Mn
				},
				getGroupBlocklist: function() {
					return Un
				},
				getGroupInfo: function() {
					return Bo
				},
				getGroupMemberAttributes: function() {
					return ei
				},
				getGroupMembersAttributes: function() {
					return ti
				},
				getGroupMsgReadUser: function() {
					return qn
				},
				getGroupMuteList: function() {
					return vn
				},
				getGroupMutelist: function() {
					return _n
				},
				getGroupSharedFilelist: function() {
					return Qn
				},
				getGroupWhitelist: function() {
					return Bn
				},
				getJoinedGroups: function() {
					return Do
				},
				getMuted: function() {
					return yn
				},
				getPublicGroups: function() {
					return wo
				},
				groupBlockMulti: function() {
					return On
				},
				groupBlockSingle: function() {
					return Tn
				},
				inviteToGroup: function() {
					return $o
				},
				inviteUsersToGroup: function() {
					return Zo
				},
				isGroupWhiteUser: function() {
					return jn
				},
				isInGroupAllowlist: function() {
					return Wn
				},
				isInGroupMutelist: function() {
					return Kn
				},
				isInGroupWhiteList: function() {
					return Fn
				},
				joinGroup: function() {
					return en
				},
				leaveGroup: function() {
					return Qo
				},
				listGroupMember: function() {
					return jo
				},
				listGroupMembers: function() {
					return Fo
				},
				listGroups: function() {
					return ko
				},
				modifyGroup: function() {
					return Ho
				},
				mute: function() {
					return fn
				},
				muteGroupMember: function() {
					return mn
				},
				quitGroup: function() {
					return Yo
				},
				rejectGroupInvite: function() {
					return ln
				},
				rejectGroupJoinRequest: function() {
					return nn
				},
				rejectInviteIntoGroup: function() {
					return cn
				},
				rejectJoinGroup: function() {
					return on
				},
				removeAdmin: function() {
					return zo
				},
				removeGroupAdmin: function() {
					return Vo
				},
				removeGroupAllowlistMember: function() {
					return Gn
				},
				removeGroupBlockMulti: function() {
					return An
				},
				removeGroupBlockSingle: function() {
					return Sn
				},
				removeGroupMember: function() {
					return dn
				},
				removeGroupMembers: function() {
					return hn
				},
				removeGroupWhitelistMember: function() {
					return xn
				},
				removeMultiGroupMember: function() {
					return pn
				},
				removeMute: function() {
					return gn
				},
				removeSingleGroupMember: function() {
					return un
				},
				rmUsersFromGroupWhitelist: function() {
					return Dn
				},
				setAdmin: function() {
					return Ko
				},
				setGroupAdmin: function() {
					return qo
				},
				setGroupMemberAttributes: function() {
					return Zn
				},
				unblockGroupMember: function() {
					return Cn
				},
				unblockGroupMembers: function() {
					return Nn
				},
				unmuteGroupMember: function() {
					return En
				},
				updateGroupAnnouncement: function() {
					return Vn
				},
				uploadGroupSharedFile: function() {
					return Jn
				}
			});
			var n = {};
			r.r(n), r.d(n, {
				addUsersToChatRoom: function() {
					return di
				},
				addUsersToChatRoomAllowlist: function() {
					return Hi
				},
				addUsersToChatRoomWhitelist: function() {
					return Bi
				},
				blockChatRoomMember: function() {
					return Ai
				},
				blockChatRoomMembers: function() {
					return Mi
				},
				chatRoomBlockMulti: function() {
					return Ni
				},
				chatRoomBlockSingle: function() {
					return Ci
				},
				createChatRoom: function() {
					return oi
				},
				deleteChatRoomSharedFile: function() {
					return $i
				},
				destroyChatRoom: function() {
					return ni
				},
				disableSendChatRoomMsg: function() {
					return xi
				},
				enableSendChatRoomMsg: function() {
					return Gi
				},
				fetchChatRoomAnnouncement: function() {
					return Xi
				},
				fetchChatRoomSharedFileList: function() {
					return Zi
				},
				getChatRoomAdmin: function() {
					return Ei
				},
				getChatRoomAllowlist: function() {
					return qi
				},
				getChatRoomAttributes: function() {
					return ta
				},
				getChatRoomBlacklist: function() {
					return Li
				},
				getChatRoomBlacklistNew: function() {
					return wi
				},
				getChatRoomBlocklist: function() {
					return Di
				},
				getChatRoomDetails: function() {
					return ii
				},
				getChatRoomMuteList: function() {
					return Ii
				},
				getChatRoomMuted: function() {
					return Oi
				},
				getChatRoomMutelist: function() {
					return Si
				},
				getChatRoomSharedFilelist: function() {
					return ea
				},
				getChatRoomWhitelist: function() {
					return Ki
				},
				getChatRooms: function() {
					return ri
				},
				getJoinedChatRooms: function() {
					return aa
				},
				isChatRoomWhiteUser: function() {
					return zi
				},
				isInChatRoomAllowlist: function() {
					return Vi
				},
				isInChatRoomMutelist: function() {
					return Ji
				},
				joinChatRoom: function() {
					return pi
				},
				leaveChatRoom: function() {
					return fi
				},
				listChatRoomMember: function() {
					return mi
				},
				listChatRoomMembers: function() {
					return gi
				},
				modifyChatRoom: function() {
					return ai
				},
				muteChatRoomMember: function() {
					return _i
				},
				quitChatRoom: function() {
					return hi
				},
				removeChatRoomAdmin: function() {
					return vi
				},
				removeChatRoomAllowlistMember: function() {
					return Wi
				},
				removeChatRoomAttribute: function() {
					return ia
				},
				removeChatRoomAttributes: function() {
					return na
				},
				removeChatRoomBlockMulti: function() {
					return Pi
				},
				removeChatRoomBlockSingle: function() {
					return bi
				},
				removeChatRoomMember: function() {
					return ci
				},
				removeChatRoomMembers: function() {
					return ui
				},
				removeChatRoomWhitelistMember: function() {
					return Fi
				},
				removeMultiChatRoomMember: function() {
					return li
				},
				removeMuteChatRoomMember: function() {
					return Ti
				},
				removeSingleChatRoomMember: function() {
					return si
				},
				rmUsersFromChatRoomWhitelist: function() {
					return ji
				},
				setChatRoomAdmin: function() {
					return yi
				},
				setChatRoomAttribute: function() {
					return oa
				},
				setChatRoomAttributes: function() {
					return ra
				},
				unblockChatRoomMember: function() {
					return Ui
				},
				unblockChatRoomMembers: function() {
					return ki
				},
				unmuteChatRoomMember: function() {
					return Ri
				},
				updateChatRoomAnnouncement: function() {
					return Yi
				},
				uploadChatRoomSharedFile: function() {
					return Qi
				}
			});
			var i = {};
			r.r(i), r.d(i, {
				getPresenceStatus: function() {
					return fa
				},
				getSubscribedPresenceList: function() {
					return pa
				},
				getSubscribedPresencelist: function() {
					return ha
				},
				publishPresence: function() {
					return la
				},
				subscribePresence: function() {
					return ua
				},
				unsubscribePresence: function() {
					return da
				}
			});
			var a = {};
			r.r(a), r.d(a, {
				clearRemindTypeForConversation: function() {
					return ya
				},
				getPushPerformLanguage: function() {
					return Ra
				},
				getSilentModeForAll: function() {
					return ga
				},
				getSilentModeForConversation: function() {
					return va
				},
				getSilentModeForConversations: function() {
					return _a
				},
				setPushPerformLanguage: function() {
					return Ta
				},
				setSilentModeForAll: function() {
					return ma
				},
				setSilentModeForConversation: function() {
					return Ea
				}
			});
			var s = {};
			r.r(s), r.d(s, {
				changeChatThreadName: function() {
					return Ma
				},
				createChatThread: function() {
					return Sa
				},
				destroyChatThread: function() {
					return Na
				},
				getChatThreadDetail: function() {
					return Da
				},
				getChatThreadLastMessage: function() {
					return wa
				},
				getChatThreadMembers: function() {
					return ba
				},
				getChatThreads: function() {
					return ka
				},
				getJoinedChatThreads: function() {
					return Pa
				},
				joinChatThread: function() {
					return Ca
				},
				leaveChatThread: function() {
					return Aa
				},
				removeChatThreadMember: function() {
					return Ua
				}
			});
			var c = {};
			r.r(c), r.d(c, {
				getSupportedLanguages: function() {
					return xa
				},
				translateMessage: function() {
					return Ga
				}
			});
			var l = {};

			function u() {
				l.converter._configure(), l.decoder._configure(), l.encoder._configure(), l.Field
					._configure(), l.MapField._configure(), l.Message._configure(), l.Namespace
					._configure(), l.Method._configure(), l.ReflectionObject._configure(), l.OneOf
					._configure(), l.parse._configure(), l.Reader._configure(), l.Root._configure(), l
					.Service._configure(), l.verifier._configure(), l.Type._configure(), l.types
					._configure(), l.wrappers._configure(), l.Writer._configure()
			}
			l.build = "minimal", l.Writer = r(244), l.encoder = r(929), l.Reader = r(494), l.util = r(
					935), l.rpc = r(325), l.roots = r(889), l.verifier = r(216), l.tokenize = r(869), l
				.parse = r(845), l.common = r(72), l.ReflectionObject = r(998), l.Namespace = r(476), l
				.Root = r(685), l.Enum = r(582), l.Type = r(192), l.Field = r(286), l.OneOf = r(735), l
				.MapField = r(435), l.Service = r(447), l.Method = r(484), l.converter = r(525), l
				.decoder = r(888), l.Message = r(339), l.wrappers = r(834), l.types = r(696), l.util =
				r(935), l.configure = u, l.load = function(e, t, r) {
					return "function" == typeof t ? (r = t, t = new l.Root) : t || (t = new l.Root), t
						.load(e, r)
				}, l.loadSync = function(e, t) {
					return t || (t = new l.Root), t.loadSync(e)
				}, l.parseFromPbString = function(e, t, r) {
					return "function" == typeof t ? (r = t, t = new l.Root) : t || (t = new l.Root), t
						.parseFromPbString(e, r)
				}, u();
			var d, p = l,
				h = r(720),
				f = r.n(h),
				m = function() {
					function e(e) {
						this.type = e.type, this.message = e.message, this.data = e.data
					}
					return e.create = function(t) {
						return new e(t)
					}, e
				}();
			! function(e) {
				e[e.REQUEST_SUCCESS = 0] = "REQUEST_SUCCESS", e[e.REQUEST_TIMEOUT = -1] =
					"REQUEST_TIMEOUT", e[e.REQUEST_UNKNOWN = -2] = "REQUEST_UNKNOWN", e[e
						.REQUEST_PARAMETER_ERROR = -3] = "REQUEST_PARAMETER_ERROR", e[e
						.REQUEST_ABORT = -4] = "REQUEST_ABORT", e[e
						.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR = 0] =
					"WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR", e[e.WEBIM_CONNCTION_OPEN_ERROR = 1] =
					"WEBIM_CONNCTION_OPEN_ERROR", e[e.WEBIM_CONNCTION_AUTH_ERROR = 2] =
					"WEBIM_CONNCTION_AUTH_ERROR", e[e.WEBIM_CONNCTION_OPEN_USERGRID_ERROR = 3] =
					"WEBIM_CONNCTION_OPEN_USERGRID_ERROR", e[e.WEBIM_CONNCTION_ATTACH_ERROR = 4] =
					"WEBIM_CONNCTION_ATTACH_ERROR", e[e.WEBIM_CONNCTION_ATTACH_USERGRID_ERROR = 5] =
					"WEBIM_CONNCTION_ATTACH_USERGRID_ERROR", e[e.WEBIM_CONNCTION_REOPEN_ERROR = 6] =
					"WEBIM_CONNCTION_REOPEN_ERROR", e[e.WEBIM_CONNCTION_SERVER_CLOSE_ERROR = 7] =
					"WEBIM_CONNCTION_SERVER_CLOSE_ERROR", e[e.WEBIM_CONNCTION_SERVER_ERROR = 8] =
					"WEBIM_CONNCTION_SERVER_ERROR", e[e.WEBIM_CONNCTION_IQ_ERROR = 9] =
					"WEBIM_CONNCTION_IQ_ERROR", e[e.WEBIM_CONNCTION_PING_ERROR = 10] =
					"WEBIM_CONNCTION_PING_ERROR", e[e.WEBIM_CONNCTION_NOTIFYVERSION_ERROR = 11] =
					"WEBIM_CONNCTION_NOTIFYVERSION_ERROR", e[e.WEBIM_CONNCTION_GETROSTER_ERROR = 12] =
					"WEBIM_CONNCTION_GETROSTER_ERROR", e[e.WEBIM_CONNCTION_CROSSDOMAIN_ERROR = 13] =
					"WEBIM_CONNCTION_CROSSDOMAIN_ERROR", e[e
						.WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES = 14] =
					"WEBIM_CONNCTION_LISTENING_OUTOF_MAXRETRIES", e[e
						.WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR = 15] =
					"WEBIM_CONNCTION_RECEIVEMSG_CONTENTERROR", e[e.WEBIM_CONNCTION_DISCONNECTED = 16] =
					"WEBIM_CONNCTION_DISCONNECTED", e[e.WEBIM_CONNCTION_AJAX_ERROR = 17] =
					"WEBIM_CONNCTION_AJAX_ERROR", e[e.WEBIM_CONNCTION_JOINROOM_ERROR = 18] =
					"WEBIM_CONNCTION_JOINROOM_ERROR", e[e.WEBIM_CONNCTION_GETROOM_ERROR = 19] =
					"WEBIM_CONNCTION_GETROOM_ERROR", e[e.WEBIM_CONNCTION_GETROOMINFO_ERROR = 20] =
					"WEBIM_CONNCTION_GETROOMINFO_ERROR", e[e.WEBIM_CONNCTION_GETROOMMEMBER_ERROR = 21] =
					"WEBIM_CONNCTION_GETROOMMEMBER_ERROR", e[e.WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR =
						22] = "WEBIM_CONNCTION_GETROOMOCCUPANTS_ERROR", e[e
						.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR = 23] =
					"WEBIM_CONNCTION_LOAD_CHATROOM_ERROR", e[e
						.WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR = 24] =
					"WEBIM_CONNCTION_NOT_SUPPORT_CHATROOM_ERROR", e[e
						.WEBIM_CONNCTION_JOINCHATROOM_ERROR = 25] =
					"WEBIM_CONNCTION_JOINCHATROOM_ERROR", e[e.WEBIM_CONNCTION_QUITCHATROOM_ERROR = 26] =
					"WEBIM_CONNCTION_QUITCHATROOM_ERROR", e[e.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR =
						27] = "WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR", e[e
						.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR = 28] =
					"WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR", e[e
						.WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR = 29] =
					"WEBIM_CONNCTION_SESSIONID_NOT_ASSIGN_ERROR", e[e
						.WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR = 30] =
					"WEBIM_CONNCTION_RID_NOT_ASSIGN_ERROR", e[e.WEBIM_CONNCTION_CALLBACK_INNER_ERROR =
						31] = "WEBIM_CONNCTION_CALLBACK_INNER_ERROR", e[e
						.WEBIM_CONNCTION_CLIENT_OFFLINE = 32] = "WEBIM_CONNCTION_CLIENT_OFFLINE", e[e
						.WEBIM_CONNCTION_CLIENT_LOGOUT = 33] = "WEBIM_CONNCTION_CLIENT_LOGOUT", e[e
						.WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR = 34] =
					"WEBIM_CONNCTION_CLIENT_TOO_MUCH_ERROR", e[e
						.WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP = 35] =
					"WEBIM_CONNECTION_ACCEPT_INVITATION_FROM_GROUP", e[e
						.WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP = 36] =
					"WEBIM_CONNECTION_DECLINE_INVITATION_FROM_GROUP", e[e
						.WEBIM_CONNECTION_ACCEPT_JOIN_GROUP = 37] =
					"WEBIM_CONNECTION_ACCEPT_JOIN_GROUP", e[e.WEBIM_CONNECTION_DECLINE_JOIN_GROUP =
					38] = "WEBIM_CONNECTION_DECLINE_JOIN_GROUP", e[e.WEBIM_CONNECTION_CLOSED = 39] =
					"WEBIM_CONNECTION_CLOSED", e[e.WEBIM_CONNECTION_ERROR = 40] =
					"WEBIM_CONNECTION_ERROR", e[e.MAX_LIMIT = 50] = "MAX_LIMIT", e[e.MESSAGE_NOT_FOUND =
						51] = "MESSAGE_NOT_FOUND", e[e.NO_PERMISSION = 52] = "NO_PERMISSION", e[e
						.OPERATION_UNSUPPORTED = 53] = "OPERATION_UNSUPPORTED", e[e
						.OPERATION_NOT_ALLOWED = 54] = "OPERATION_NOT_ALLOWED", e[e
						.WEBIM_TOKEN_EXPIRED = 56] = "WEBIM_TOKEN_EXPIRED", e[e
						.WEBIM_SERVER_SERVING_DISABLED = 57] = "WEBIM_SERVER_SERVING_DISABLED", e[e
						.WEBIM_UPLOADFILE_BROWSER_ERROR = 100] = "WEBIM_UPLOADFILE_BROWSER_ERROR", e[e
						.WEBIM_UPLOADFILE_ERROR = 101] = "WEBIM_UPLOADFILE_ERROR", e[e
						.WEBIM_UPLOADFILE_NO_LOGIN = 102] = "WEBIM_UPLOADFILE_NO_LOGIN", e[e
						.WEBIM_UPLOADFILE_NO_FILE = 103] = "WEBIM_UPLOADFILE_NO_FILE", e[e
						.WEBIM_DOWNLOADFILE_ERROR = 200] = "WEBIM_DOWNLOADFILE_ERROR", e[e
						.WEBIM_DOWNLOADFILE_NO_LOGIN = 201] = "WEBIM_DOWNLOADFILE_NO_LOGIN", e[e
						.WEBIM_DOWNLOADFILE_BROWSER_ERROR = 202] = "WEBIM_DOWNLOADFILE_BROWSER_ERROR",
					e[e.PARSE_FILE_ERROR = 203] = "PARSE_FILE_ERROR", e[e.USER_NOT_FOUND = 204] =
					"USER_NOT_FOUND", e[e.MESSAGE_PARAMETER_ERROR = 205] = "MESSAGE_PARAMETER_ERROR", e[
						e.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE = 206] =
					"WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE", e[e.WEBIM_CONNCTION_USER_REMOVED =
					207] = "WEBIM_CONNCTION_USER_REMOVED", e[e
						.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD = 216] =
					"WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD", e[e
						.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE = 217] =
					"WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE", e[e.USER_MUTED_BY_ADMIN = 219] =
					"USER_MUTED_BY_ADMIN", e[e.USER_NOT_FRIEND = 221] = "USER_NOT_FRIEND", e[e
						.WEBIM_MESSAGE_REC_TEXT = 300] = "WEBIM_MESSAGE_REC_TEXT", e[e
						.WEBIM_MESSAGE_REC_TEXT_ERROR = 301] = "WEBIM_MESSAGE_REC_TEXT_ERROR", e[e
						.WEBIM_MESSAGE_REC_EMOTION = 302] = "WEBIM_MESSAGE_REC_EMOTION", e[e
						.WEBIM_MESSAGE_REC_PHOTO = 303] = "WEBIM_MESSAGE_REC_PHOTO", e[e
						.WEBIM_MESSAGE_REC_AUDIO = 304] = "WEBIM_MESSAGE_REC_AUDIO", e[e
						.WEBIM_MESSAGE_REC_AUDIO_FILE = 305] = "WEBIM_MESSAGE_REC_AUDIO_FILE", e[e
						.WEBIM_MESSAGE_REC_VEDIO = 306] = "WEBIM_MESSAGE_REC_VEDIO", e[e
						.WEBIM_MESSAGE_REC_VEDIO_FILE = 307] = "WEBIM_MESSAGE_REC_VEDIO_FILE", e[e
						.WEBIM_MESSAGE_REC_FILE = 308] = "WEBIM_MESSAGE_REC_FILE", e[e
						.WEBIM_MESSAGE_SED_TEXT = 309] = "WEBIM_MESSAGE_SED_TEXT", e[e
						.WEBIM_MESSAGE_SED_EMOTION = 310] = "WEBIM_MESSAGE_SED_EMOTION", e[e
						.WEBIM_MESSAGE_SED_PHOTO = 311] = "WEBIM_MESSAGE_SED_PHOTO", e[e
						.WEBIM_MESSAGE_SED_AUDIO = 312] = "WEBIM_MESSAGE_SED_AUDIO", e[e
						.WEBIM_MESSAGE_SED_AUDIO_FILE = 313] = "WEBIM_MESSAGE_SED_AUDIO_FILE", e[e
						.WEBIM_MESSAGE_SED_VEDIO = 314] = "WEBIM_MESSAGE_SED_VEDIO", e[e
						.WEBIM_MESSAGE_SED_VEDIO_FILE = 315] = "WEBIM_MESSAGE_SED_VEDIO_FILE", e[e
						.WEBIM_MESSAGE_SED_FILE = 316] = "WEBIM_MESSAGE_SED_FILE", e[e
						.WEBIM_MESSAGE_SED_ERROR = 317] = "WEBIM_MESSAGE_SED_ERROR", e[e.STATUS_INIT =
						400] = "STATUS_INIT", e[e.STATUS_DOLOGIN_USERGRID = 401] =
					"STATUS_DOLOGIN_USERGRID", e[e.STATUS_DOLOGIN_IM = 402] = "STATUS_DOLOGIN_IM", e[e
						.STATUS_OPENED = 403] = "STATUS_OPENED", e[e.STATUS_CLOSING = 404] =
					"STATUS_CLOSING", e[e.STATUS_CLOSED = 405] = "STATUS_CLOSED", e[e.STATUS_ERROR =
						406] = "STATUS_ERROR", e[e.SERVER_BUSY = 500] = "SERVER_BUSY", e[e
						.MESSAGE_INCLUDE_ILLEGAL_CONTENT = 501] = "MESSAGE_INCLUDE_ILLEGAL_CONTENT", e[e
						.MESSAGE_EXTERNAL_LOGIC_BLOCKED = 502] = "MESSAGE_EXTERNAL_LOGIC_BLOCKED", e[e
						.SERVER_UNKNOWN_ERROR = 503] = "SERVER_UNKNOWN_ERROR", e[e
						.MESSAGE_RECALL_TIME_LIMIT = 504] = "MESSAGE_RECALL_TIME_LIMIT", e[e
						.SERVICE_NOT_ENABLED = 505] = "SERVICE_NOT_ENABLED", e[e
						.SERVICE_NOT_ALLOW_MESSAGING = 506] = "SERVICE_NOT_ALLOW_MESSAGING", e[e
						.SERVICE_NOT_ALLOW_MESSAGING_MUTE = 507] = "SERVICE_NOT_ALLOW_MESSAGING_MUTE",
					e[e.MESSAGE_MODERATION_BLOCKED = 508] = "MESSAGE_MODERATION_BLOCKED", e[e
						.MESSAGE_CURRENT_LIMITING = 509] = "MESSAGE_CURRENT_LIMITING", e[e
						.MESSAGE_WEBSOCKET_DISCONNECTED = 510] = "MESSAGE_WEBSOCKET_DISCONNECTED", e[e
						.MESSAGE_SIZE_LIMIT = 511] = "MESSAGE_SIZE_LIMIT", e[e.GROUP_NOT_EXIST = 605] =
					"GROUP_NOT_EXIST", e[e.GROUP_NOT_JOINED = 602] = "GROUP_NOT_JOINED", e[e
						.GROUP_MEMBERS_FULL = 606] = "GROUP_MEMBERS_FULL", e[e.PERMISSION_DENIED =
					603] = "PERMISSION_DENIED", e[e.WEBIM_LOAD_MSG_ERROR = 604] =
					"WEBIM_LOAD_MSG_ERROR", e[e.GROUP_ALREADY_JOINED = 601] = "GROUP_ALREADY_JOINED", e[
						e.GROUP_MEMBERS_LIMIT = 607] = "GROUP_MEMBERS_LIMIT", e[e.GROUP_IS_DISABLED =
						608] = "GROUP_IS_DISABLED", e[e.GROUP_MEMBER_ATTRIBUTES_SET_FAILED = 609] =
					"GROUP_MEMBER_ATTRIBUTES_SET_FAILED", e[e.REST_PARAMS_STATUS = 700] =
					"REST_PARAMS_STATUS", e[e.CHATROOM_NOT_JOINED = 702] = "CHATROOM_NOT_JOINED", e[e
						.CHATROOM_MEMBERS_FULL = 704] = "CHATROOM_MEMBERS_FULL", e[e
						.CHATROOM_NOT_EXIST = 705] = "CHATROOM_NOT_EXIST", e[e
						.LOCAL_DB_OPERATION_FAILED = 800] = "LOCAL_DB_OPERATION_FAILED", e[e
						.SDK_RUNTIME_ERROR = 999] = "SDK_RUNTIME_ERROR", e[e.PRESENCE_PARAM_EXCEED =
						1100] = "PRESENCE_PARAM_EXCEED", e[e.REACTION_ALREADY_ADDED = 1101] =
					"REACTION_ALREADY_ADDED", e[e.REACTION_CREATING = 1102] = "REACTION_CREATING", e[e
						.REACTION_OPERATION_IS_ILLEGAL = 1103] = "REACTION_OPERATION_IS_ILLEGAL", e[e
						.TRANSLATION_NOT_VALID = 1200] = "TRANSLATION_NOT_VALID", e[e
						.TRANSLATION_TEXT_TOO_LONG = 1201] = "TRANSLATION_TEXT_TOO_LONG", e[e
						.TRANSLATION_FAILED = 1204] = "TRANSLATION_FAILED", e[e.THREAD_NOT_EXIST =
					1300] = "THREAD_NOT_EXIST", e[e.THREAD_ALREADY_EXIST = 1301] =
					"THREAD_ALREADY_EXIST", e[e.MODIFY_MESSAGE_NOT_EXIST = 1302] =
					"MODIFY_MESSAGE_NOT_EXIST", e[e.MODIFY_MESSAGE_FORMAT_ERROR = 1303] =
					"MODIFY_MESSAGE_FORMAT_ERROR", e[e.MODIFY_MESSAGE_FAILED = 1304] =
					"MODIFY_MESSAGE_FAILED", e[e.CONVERSATION_NOT_EXIST = 1400] =
					"CONVERSATION_NOT_EXIST"
			}(d || (d = {}));
			var g, E, y, v, _, T, R = function() {
					return R = Object.assign || function(e) {
						for (var t, r = 1, o = arguments.length; r < o; r++)
							for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t,
								n) && (e[n] = t[n]);
						return e
					}, R.apply(this, arguments)
				},
				O = function(e, t, r, o) {
					var n, i, a, s, c, l, u, p, h, f, m, g, E, y, v, _, T, O, I, S, C, A, N, M, b = e
						.response;
					b && "string" == typeof b && (b = JSON.parse(b));
					var U = e.status,
						P = {
							elapse: o,
							httpCode: U,
							errDesc: null == b ? void 0 : b.error_description
						};
					if (400 === U) {
						if (40002 === b.error_code) return void t({
							type: d.THREAD_ALREADY_EXIST,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						});
						if (40009 === b.error_code) return void t({
							type: d.OPERATION_UNSUPPORTED,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						});
						if (60005 === b.error_code) return void t({
							type: d.GROUP_MEMBER_ATTRIBUTES_SET_FAILED,
							message: (null == b ? void 0 : b.desc) || (null == b ? void 0 :
								b.error_description),
							extraInfo: P
						});
						if (60010 === b.error_code) return void((null == b ? void 0 : b
							.error_description.includes(
								"exceeds chatgroup user metadata single value limit")) ? t({
							type: d.MAX_LIMIT,
							message: (null == b ? void 0 : b.desc) || b
								.error_description,
							extraInfo: P
						}) : t({
							type: d.NO_PERMISSION,
							message: (null == b ? void 0 : b.desc) || b
								.error_description,
							extraInfo: P
						}));
						if (60011 === b.error_code) return void t({
							type: d.CHATROOM_NOT_JOINED,
							message: null == b ? void 0 : b.desc,
							extraInfo: P
						});
						if (14403 === b.error_code) return void t({
							type: d.WEBIM_UPLOADFILE_ERROR,
							message: null == b ? void 0 : b.error_description,
							data: b,
							extraInfo: P
						});
						if (60006 === b.error_code || 60007 === b.error_code || 60009 === b
							.error_code || 60012 === b.error_code) return void t({
							type: d.MAX_LIMIT,
							message: (null == b ? void 0 : b.desc) || (null == b ? void 0 :
								b.error_description),
							extraInfo: P
						});
						if (91104 === b.error_code) return void t({
							type: d.NO_PERMISSION,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						});
						if (null === (n = b.error_description) || void 0 === n ? void 0 : n.includes(
								"are not members of this group")) return (null === (i = e
								.responseURL) || void 0 === i ? void 0 : i.includes("chatgroups")) ?
							t({
								type: d.GROUP_NOT_JOINED,
								data: e.response || e.responseText,
								message: b.error_description,
								extraInfo: P
							}) : t({
								type: d.CHATROOM_NOT_JOINED,
								data: e.response || e.responseText,
								message: b.error_description,
								extraInfo: P
							}), void r({
								type: d.WEBIM_CONNCTION_AJAX_ERROR,
								message: null == b ? void 0 : b.error_description,
								data: e.responseText,
								extraInfo: P
							});
						if ("the app not open presence" === (null == b ? void 0 : b.result))
						return void t({
								type: d.SERVICE_NOT_ENABLED,
								message: null == b ? void 0 : b.result,
								extraInfo: P
							});
						if (null == b ? void 0 : b.error_description.includes(
							"remark length must less")) return void t({
							type: d.MAX_LIMIT,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						});
						switch (null == b ? void 0 : b.error_description) {
							case "the user is already operation this message":
								t({
									type: d.REACTION_ALREADY_ADDED,
									message: null == b ? void 0 : b.error_description,
									extraInfo: P
								});
								break;
							case "The quantity has exceeded the limit!":
								t({
									type: d.MAX_LIMIT,
									message: null == b ? void 0 : b.error_description,
									extraInfo: P
								});
								break;
							case "The user not in this group!":
								t({
									type: d.GROUP_NOT_JOINED,
									message: null == b ? void 0 : b.error_description,
									extraInfo: P
								});
								break;
							case "the user operation is illegal!":
								t({
									type: d.REACTION_OPERATION_IS_ILLEGAL,
									message: null == b ? void 0 : b.error_description,
									extraInfo: P
								});
								break;
							case "this appKey is not open reaction service!":
							case "this appKey not open message roaming":
								t({
									type: d.SERVICE_NOT_ENABLED,
									message: null == b ? void 0 : b.error_description,
									extraInfo: P
								});
								break;
							case "this message is creating reaction, please try again.":
								t({
									type: d.REACTION_CREATING,
									message: null == b ? void 0 : b.error_description,
									extraInfo: P
								});
								break;
							case "groupId can not be null!":
								t({
									type: d.GROUP_NOT_EXIST,
									message: null == b ? void 0 : b.error_description,
									extraInfo: P
								});
								break;
							case "The input text is too long.":
								t({
									type: d.TRANSLATION_TEXT_TOO_LONG,
									message: null == b ? void 0 : b.error_description,
									extraInfo: P
								});
								break;
							case "The target language is not valid.":
								t({
									type: d.TRANSLATION_NOT_VALID,
									message: null == b ? void 0 : b.error_description,
									extraInfo: P
								});
								break;
							case "report failed, get message by id failed":
								t({
									type: d.MESSAGE_NOT_FOUND,
									message: null == b ? void 0 : b.error_description,
									extraInfo: P
								});
								break;
							case "ext is too big ":
								t({
									type: d.PRESENCE_PARAM_EXCEED,
									message: null == b ? void 0 : b.error_description,
									extraInfo: P
								});
								break;
							case "Request body not readable.Please check content type is correct!":
							case "param mark must be not empty, please check!":
							case "param mark illegal, please check it!":
							case "param pin_msg_id illegal, please check it!":
							case "param type only allow [groupchat,chatroom]!, please check!":
								t({
									type: d.REQUEST_PARAMETER_ERROR,
									message: null == b ? void 0 : b.error_description,
									extraInfo: P
								});
								break;
							case "updateRemark | they are not friends, please add as a friend first.":
								t({
									type: d.USER_NOT_FRIEND,
									message: null == b ? void 0 : b.error_description,
									extraInfo: P
								});
								break;
							default:
								t({
									type: d.WEBIM_CONNCTION_AJAX_ERROR,
									message: null == b ? void 0 : b.error_description,
									data: e.responseText,
									extraInfo: P
								}), r({
									type: d.WEBIM_CONNCTION_AJAX_ERROR,
									message: null == b ? void 0 : b.error_description,
									data: e.responseText,
									extraInfo: P
								})
						}
					} else if (401 === U) 40001 === b.error_code || 60001 === b.error_code ||
						"Unable to authenticate (OAuth)" === b.error_description ? t({
							type: d.NO_PERMISSION,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						}) : (r({
							type: d.WEBIM_CONNCTION_AJAX_ERROR,
							data: e.responseText,
							message: e.responseText,
							extraInfo: P
						}), t({
							type: d.WEBIM_CONNCTION_AJAX_ERROR,
							data: e.responseText,
							message: e.responseText,
							extraInfo: P
						}));
					else if (403 === U) 4e4 === b.error_code || 60004 === b.error_code || 15002 === b
						.error_code ? t({
							type: d.SERVICE_NOT_ENABLED,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						}) : 40003 === b.error_code || 40004 === b.error_code ? t({
							type: d.THREAD_ALREADY_EXIST,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						}) : 40005 === b.error_code || 40007 === b.error_code || 91002 === b
						.error_code ? t({
							type: d.MAX_LIMIT,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						}) : 60002 === b.error_code ? t({
							type: d.PERMISSION_DENIED,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						}) : 91101 === b.error_code ? t({
							type: d.MAX_LIMIT,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						}) : 91102 === b.error_code && t({
							type: d.REQUEST_PARAMETER_ERROR,
							message: b.error_description,
							extraInfo: P
						}), "group member list is full!" === b.error_description ? (null === (a = e
							.responseURL) || void 0 === a ? void 0 : a.includes("chatgroups")) ? t({
							type: d.GROUP_MEMBERS_FULL,
							data: e.response || e.responseText,
							message: b.error_description,
							extraInfo: P
						}) : t({
							type: d.CHATROOM_MEMBERS_FULL,
							data: e.response || e.responseText,
							message: b.error_description,
							extraInfo: P
						}) : (null === (s = b.error_description) || void 0 === s ? void 0 : s.includes(b
							.error_description.includes("already in group"))) ? (null === (c = e
							.responseURL) || void 0 === c ? void 0 : c.includes("chatgroups")) && t({
							type: d.GROUP_ALREADY_JOINED,
							data: e.response || e.responseText,
							message: b.error_description,
							extraInfo: P
						}) : (null === (l = b.error_description) || void 0 === l ? void 0 : l.includes(
							"are not members of this group")) ? (null === (u = e.responseURL) ||
							void 0 === u ? void 0 : u.includes("chatgroups")) ? t({
							type: d.GROUP_NOT_JOINED,
							data: e.response || e.responseText,
							message: b.error_description,
							extraInfo: P
						}) : t({
							type: d.CHATROOM_NOT_JOINED,
							data: e.response || e.responseText,
							message: b.error_description,
							extraInfo: P
						}) : (null === (p = b.error_description) || void 0 === p ? void 0 : p.includes(
							"service not open!")) || (null === (h = b.error_description) || void 0 ===
							h ? void 0 : h.includes("message report not open")) || (null === (f = b
							.error_description) || void 0 === f ? void 0 : f.includes(
							"messageroaming function not open")) ? t({
							type: d.SERVICE_NOT_ENABLED,
							data: e.response || e.responseText,
							message: b.error_description,
							extraInfo: P
						}) : (null === (m = b.error_description) || void 0 === m ? void 0 : m.includes(
							"members size is greater than max user size !")) ? t({
							type: d.GROUP_MEMBERS_LIMIT,
							data: e.response || e.responseText,
							message: b.error_description,
							extraInfo: P
						}) : (null === (g = b.error_description) || void 0 === g ? void 0 : g.includes(
							"can not operate this group, reason: group is disabled")) ? t({
							type: d.GROUP_IS_DISABLED,
							data: e.response || e.responseText,
							message: b.error_description,
							extraInfo: P
						}) : (null === (E = b.error_description) || void 0 === E ? void 0 : E.includes(
							"Invitee's contact max count")) || (null === (y = b.error_description) ||
							void 0 === y ? void 0 : y.includes("Inviter's contact max count")) ? t({
							type: d.MAX_LIMIT,
							data: e.response || e.responseText,
							message: b.error_description,
							extraInfo: P
						}) : t({
							type: d.PERMISSION_DENIED,
							data: e.response || e.responseText,
							message: "permission denied",
							extraInfo: R(R({}, P), {
								errDesc: "permission denied"
							})
						}), r({
							type: d.WEBIM_CONNCTION_AJAX_ERROR,
							data: e.responseText,
							message: e.responseText,
							extraInfo: P
						});
					else if (404 === U) 40011 === b.error_code ? t({
							type: d.THREAD_NOT_EXIST,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						}) : 40012 === b.error_code ? t({
							type: d.NO_PERMISSION,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						}) : 60003 === b.error_code || 20004 === b.error_code ? t({
							type: d.GROUP_NOT_JOINED,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						}) : 91001 === b.error_code && t({
							type: d.CONVERSATION_NOT_EXIST,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						}), (null === (v = b.error_description) || void 0 === v ? void 0 : v.includes(
							"do not find this group")) || (null === (_ = b.error_description) ||
							void 0 === _ ? void 0 : _.includes("does not exist")) ? (null === (T = e
							.responseURL) || void 0 === T ? void 0 : T.includes("chatgroups")) ? t({
							type: d.GROUP_NOT_EXIST,
							data: e.response || e.responseText,
							message: "The chat room dose not exist.",
							extraInfo: R(R({}, P), {
								errDesc: "The chat room dose not exist."
							})
						}) : t({
							type: d.CHATROOM_NOT_EXIST,
							data: e.response || e.responseText,
							message: "The chat room dose not exist.",
							extraInfo: R(R({}, P), {
								errDesc: "The chat room dose not exist."
							})
						}) : (null === (O = b.error_description) || void 0 === O ? void 0 : O.includes(
							"username")) && (null === (I = b.error_description) || void 0 === I ?
							void 0 : I.includes("doesn't exist!'")) || (null === (S = b
							.error_description) || void 0 === S ? void 0 : S.includes(
							"user not found")) || (null === (C = b.error_description) || void 0 === C ?
							void 0 : C.includes("Service resource not found")) &&
						"UserNotFoundException" === (null == b ? void 0 : b.exception) ? t({
							type: d.USER_NOT_FOUND,
							data: e.response || e.responseText,
							message: b.error_description,
							extraInfo: P
						}) : b.error_description.includes("user session pin message not exist") ? t({
							type: d.MESSAGE_NOT_FOUND,
							message: b.error_description,
							extraInfo: P
						}) : t({
							type: d.WEBIM_CONNCTION_AJAX_ERROR,
							data: e.response || e.responseText,
							message: e.responseText,
							extraInfo: P
						}), r({
							type: d.WEBIM_CONNCTION_AJAX_ERROR,
							data: e.response || e.responseText,
							message: e.responseText,
							extraInfo: P
						});
					else if (406 === U) 90004 === b.error_code && t({
						type: d.OPERATION_NOT_ALLOWED,
						message: null == b ? void 0 : b.error_description,
						extraInfo: P
					});
					else if (429 === U || 503 === U) {
						if (null === (A = b.error_description) || void 0 === A ? void 0 : A.includes(
								"The request has reached the maximum limit")) return void t({
							type: d.MAX_LIMIT,
							message: e.responseText,
							extraInfo: P
						});
						if (null === (N = b.error_description) || void 0 === N ? void 0 : N.includes(
								"upload client logs reached limit")) return void t({
							type: d.MAX_LIMIT,
							message: e.responseText
						});
						t({
							type: d.SERVER_BUSY,
							data: e.response || e.responseText,
							message: "Server is busy.",
							extraInfo: R(R({}, P), {
								errDesc: "Server is busy."
							})
						}), r({
							type: d.WEBIM_CONNCTION_AJAX_ERROR,
							data: e.responseText,
							message: "Server is busy.",
							extraInfo: R(R({}, P), {
								errDesc: "Server is busy."
							})
						})
					} else if (500 === U) {
						if (40006 === b.error_code || 40008 === b.error_code || 40010 === b.error_code)
							return void t({
								type: d.SERVER_UNKNOWN_ERROR,
								message: null == b ? void 0 : b.error_description,
								extraInfo: P
							});
						if (90005 === b.error_code || 99999 === b.error_code) return void t({
							type: d.REQUEST_UNKNOWN,
							message: null == b ? void 0 : b.error_description,
							extraInfo: P
						});
						if (null === (M = b.error_description) || void 0 === M ? void 0 : M.includes(
								"translte failed!")) return void t({
							type: d.TRANSLATION_FAILED,
							message: e.responseText,
							extraInfo: P
						});
						t({
							type: d.WEBIM_CONNCTION_AJAX_ERROR,
							data: e.responseText,
							message: "",
							extraInfo: P
						}), r({
							type: d.WEBIM_CONNCTION_AJAX_ERROR,
							data: e.responseText,
							message: "",
							extraInfo: P
						})
					} else t({
						type: d.WEBIM_CONNCTION_AJAX_ERROR,
						data: e.responseText,
						message: e.responseText,
						extraInfo: R(R({}, P), {
							errDesc: "ajax error"
						})
					}), r({
						type: d.WEBIM_CONNCTION_AJAX_ERROR,
						data: e.responseText,
						message: e.responseText,
						extraInfo: R(R({}, P), {
							errDesc: "ajax error"
						})
					})
				};
			! function(e) {
				e[e.UNKNOWOPERATION = -1] = "UNKNOWOPERATION", e[e.REST_GET_SESSION_LIST = 1] =
					"REST_GET_SESSION_LIST", e[e.REST_DEL_SESSION = 2] = "REST_DEL_SESSION", e[e
						.REST_GET_HISTORY_MESSAGE = 3] = "REST_GET_HISTORY_MESSAGE", e[e
						.REST_PIN_CONVERSATION = 4] = "REST_PIN_CONVERSATION", e[e
						.REST_MARK_CONVERSATION = 5] = "REST_MARK_CONVERSATION", e[e
						.REST_UPLOAD_FILE_IN_PARTS = 6] = "REST_UPLOAD_FILE_IN_PARTS", e[e
						.REST_DELETE_MESSAGES_CONVERSATIONS = 7] = "REST_DELETE_MESSAGES_CONVERSATIONS",
					e[e.REST_PIN_MESSAGE = 8] = "REST_PIN_MESSAGE", e[e.REST_FETCH_PINMESSAGES = 9] =
					"REST_FETCH_PINMESSAGES", e[e.REST_OPERATE = 100] = "REST_OPERATE", e[e
						.MSYNC_SENDMESSAGE = 101] = "MSYNC_SENDMESSAGE", e[e.MSYNC_RECALLMESSAGE =
					102] = "MSYNC_RECALLMESSAGE", e[e.MSYNC_MODIFYMESSAGE = 103] =
					"MSYNC_MODIFYMESSAGE", e[e.MSYNC_OPERATE = 200] = "MSYNC_OPERATE", e[e.ROSTER_ADD =
						201] = "ROSTER_ADD", e[e.ROSTER_REMOVE = 202] = "ROSTER_REMOVE", e[e
						.ROSTER_ACCEPT = 203] = "ROSTER_ACCEPT", e[e.ROSTER_DECLINE = 204] =
					"ROSTER_DECLINE", e[e.ROSTER_BAN = 205] = "ROSTER_BAN", e[e.ROSTER_ALLOW = 206] =
					"ROSTER_ALLOW", e[e.ROSTER_BLACKLIST = 207] = "ROSTER_BLACKLIST", e[e
						.ROSTER_CONTACTS = 208] = "ROSTER_CONTACTS", e[e
						.ROSTER_GET_ALL_CONTACTS_REMARKS = 209] = "ROSTER_GET_ALL_CONTACTS_REMARKS", e[e
						.ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE = 210] =
					"ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE", e[e
						.ROSTER_SET_CONTACT_REMARK = 211] = "ROSTER_SET_CONTACT_REMARK", e[e
						.ROSTER_OPERATE = 300] = "ROSTER_OPERATE", e[e.USER_LOGIN = 301] = "USER_LOGIN",
					e[e.USER_CREATE = 302] = "USER_CREATE", e[e.USER_UPDATE_USERINFO = 303] =
					"USER_UPDATE_USERINFO", e[e.USER_FETCH_USERINFO = 304] = "USER_FETCH_USERINFO", e[e
						.USER_UPDATE_NICK = 305] = "USER_UPDATE_NICK", e[e.USER_UPLOAD_PUSH_TOKEN =
					306] = "USER_UPLOAD_PUSH_TOKEN", e[e.USER_LOGGEDIN_OTHER_PLATFORM = 307] =
					"USER_LOGGEDIN_OTHER_PLATFORM", e[e.USER_OPERATE = 400] = "USER_OPERATE", e[e
						.GROUP_CREATEGROUP = 401] = "GROUP_CREATEGROUP", e[e.GROUP_BLOCK_MESSAGE =
					402] = "GROUP_BLOCK_MESSAGE", e[e.GROUP_FETCH_PUBLICGROUPS_WITHCURSOR = 403] =
					"GROUP_FETCH_PUBLICGROUPS_WITHCURSOR", e[e.GROUP_FETCH_USERS_GROUP = 404] =
					"GROUP_FETCH_USERS_GROUP", e[e.GROUP_CHANGE_OWNER = 405] = "GROUP_CHANGE_OWNER", e[e
						.GROUP_FETCH_SPECIFICATION = 406] = "GROUP_FETCH_SPECIFICATION", e[e
						.GROUP_CHANGE_GROUPATTRIBUTE = 407] = "GROUP_CHANGE_GROUPATTRIBUTE", e[e
						.GROUP_FETCH_MEMEBERS = 408] = "GROUP_FETCH_MEMEBERS", e[e.GROUP_GET_ADMIN =
						409] = "GROUP_GET_ADMIN", e[e.GROUP_SET_ADMIN = 410] = "GROUP_SET_ADMIN", e[e
						.GROUP_REMOVE_ADMIN = 411] = "GROUP_REMOVE_ADMIN", e[e.GROUP_DESTOTYGROUP =
					412] = "GROUP_DESTOTYGROUP", e[e.GROUP_LEAVEGROUP = 413] = "GROUP_LEAVEGROUP", e[e
						.GROUP_INVITE_TO_GROUP = 414] = "GROUP_INVITE_TO_GROUP", e[e
						.GROUP_JOIN_PUBLICGROUP = 415] = "GROUP_JOIN_PUBLICGROUP", e[e
						.GROUP_ACCEPT_JOINPUBLICGROUPAPPL = 416] = "GROUP_ACCEPT_JOINPUBLICGROUPAPPL",
					e[e.GROUP_DECLINE_JOINPUBLICGROUPAPPL = 417] = "GROUP_DECLINE_JOINPUBLICGROUPAPPL",
					e[e.GROUP_ACCEPT_INVITATION = 418] = "GROUP_ACCEPT_INVITATION", e[e
						.GROUP_DECLINE_INVITATION = 419] = "GROUP_DECLINE_INVITATION", e[e
						.GROUP_REMOVE_MEMBER = 420] = "GROUP_REMOVE_MEMBER", e[e.GROUP_REMOVE_MEMBERS =
						421] = "GROUP_REMOVE_MEMBERS", e[e.GROUP_MUTE_MEMBERS = 422] =
					"GROUP_MUTE_MEMBERS", e[e.GROUP_UNMUTE_MEMBERS = 423] = "GROUP_UNMUTE_MEMBERS", e[e
						.GROUP_FETCH_MUTES = 424] = "GROUP_FETCH_MUTES", e[e.GROUP_BLOCK_MEMBER = 425] =
					"GROUP_BLOCK_MEMBER", e[e.GROUP_BLOCK_MEMBERS = 426] = "GROUP_BLOCK_MEMBERS", e[e
						.GROUP_UNBLOCK_MEMBER = 427] = "GROUP_UNBLOCK_MEMBER", e[e
						.GROUP_UNBLOCK_MEMBERS = 428] = "GROUP_UNBLOCK_MEMBERS", e[e
						.GROUP_GET_BLOCK_LIST = 429] = "GROUP_GET_BLOCK_LIST", e[e
						.GROUP_MUTE_ALLMEMBERS = 430] = "GROUP_MUTE_ALLMEMBERS", e[e
						.GROUP_UNMUTE_ALLMEMBERS = 431] = "GROUP_UNMUTE_ALLMEMBERS", e[e
						.GROUP_ADD_WHITELIST = 432] = "GROUP_ADD_WHITELIST", e[e
						.GROUP_REMOVE_WHITELIST = 433] = "GROUP_REMOVE_WHITELIST", e[e
						.GROUP_FETCH_WHITELIST = 434] = "GROUP_FETCH_WHITELIST", e[e
						.GROUP_IS_IN_WHITELIST = 435] = "GROUP_IS_IN_WHITELIST", e[e
						.GROUP_GET_READ_USERS = 436] = "GROUP_GET_READ_USERS", e[e
						.GROUP_FETCH_ANNOUNCEMENT = 437] = "GROUP_FETCH_ANNOUNCEMENT", e[e
						.GROUP_UPDATE_ANNOUNCEMENT = 438] = "GROUP_UPDATE_ANNOUNCEMENT", e[e
						.GROUP_UPLOAD_SHAREDFILE = 439] = "GROUP_UPLOAD_SHAREDFILE", e[e
						.GROUP_DELETE_SHAREDFILE = 440] = "GROUP_DELETE_SHAREDFILE", e[e
						.GROUP_FETCH_SHAREDFILE = 441] = "GROUP_FETCH_SHAREDFILE", e[e
						.GROUP_DOWNLOAD_SHAREDFILE = 442] = "GROUP_DOWNLOAD_SHAREDFILE", e[e
						.GROUP_MEMBER_SET_META_DATA = 443] = "GROUP_MEMBER_SET_META_DATA", e[e
						.GROUP_MEMBER_FETCH_META_DATA = 444] = "GROUP_MEMBER_FETCH_META_DATA", e[e
						.GROUP_OPERATE = 500] = "GROUP_OPERATE", e[e.CHATROOM_FETCH_CHATROOMSWITHPAGE =
						501] = "CHATROOM_FETCH_CHATROOMSWITHPAGE", e[e.CHATROOM_CREATECHATROOM = 502] =
					"CHATROOM_CREATECHATROOM", e[e.CHATROOM_DESTORYCHATROOM = 503] =
					"CHATROOM_DESTORYCHATROOM", e[e.CHATROOM_FETCH_SPECIFICATION = 504] =
					"CHATROOM_FETCH_SPECIFICATION", e[e.CHATROOM_CHANGE_ATTRIBUTE = 505] =
					"CHATROOM_CHANGE_ATTRIBUTE", e[e.CHATROOM_REMOVE_MEMBER = 506] =
					"CHATROOM_REMOVE_MEMBER", e[e.CHATROOM_REMOVE_MEMBERS = 507] =
					"CHATROOM_REMOVE_MEMBERS", e[e.CHATROOM_ADD_MEMBERS = 508] = "CHATROOM_ADD_MEMBERS",
					e[e.CHATROOM_JOINCAHTROOM = 509] = "CHATROOM_JOINCAHTROOM", e[e
						.CHATROOM_LEAVECAHTROOM = 510] = "CHATROOM_LEAVECAHTROOM", e[e
						.CHATROOM_FETCH_MEMBERS = 511] = "CHATROOM_FETCH_MEMBERS", e[e
						.CHATROOM_GET_ADMIN = 512] = "CHATROOM_GET_ADMIN", e[e.CHATROOM_SET_ADMIN =
					513] = "CHATROOM_SET_ADMIN", e[e.CHATROOM_REMOVE_ADMIN = 514] =
					"CHATROOM_REMOVE_ADMIN", e[e.CHATROOM_MUTE_USER = 515] = "CHATROOM_MUTE_USER", e[e
						.CHATROOM_UNMUTE_USER = 516] = "CHATROOM_UNMUTE_USER", e[e
						.CHATROOM_FETCH_MUTES = 517] = "CHATROOM_FETCH_MUTES", e[e.CHATROOM_BLOCK_USER =
						518] = "CHATROOM_BLOCK_USER", e[e.CHATROOM_BLOCK_USERS = 519] =
					"CHATROOM_BLOCK_USERS", e[e.CHATROOM_UNBLOCK_USER = 520] = "CHATROOM_UNBLOCK_USER",
					e[e.CHATROOM_UNBLOCK_USERS = 521] = "CHATROOM_UNBLOCK_USERS", e[e
						.CHATROOM_FETCH_BANS = 522] = "CHATROOM_FETCH_BANS", e[e
						.CHATROOM_MUTE_ALLMEMEBERS = 523] = "CHATROOM_MUTE_ALLMEMEBERS", e[e
						.CHATROOM_UNMUTE_ALLMEMEBERS = 524] = "CHATROOM_UNMUTE_ALLMEMEBERS", e[e
						.CHATROOM_ADD_WHITELIST = 525] = "CHATROOM_ADD_WHITELIST", e[e
						.CHATROOM_REMOVE_WHITELIST = 526] = "CHATROOM_REMOVE_WHITELIST", e[e
						.CHATROOM_FETCH_WHITELIST = 527] = "CHATROOM_FETCH_WHITELIST", e[e
						.CHATROOM_FETCH_MEMBERIN_WHITELIST = 528] = "CHATROOM_FETCH_MEMBERIN_WHITELIST",
					e[e.CHATROOM_FETCH_ANNOUNCEMENT = 529] = "CHATROOM_FETCH_ANNOUNCEMENT", e[e
						.CHATROOM_UPDATE_ANNOUNCEMENT = 530] = "CHATROOM_UPDATE_ANNOUNCEMENT", e[e
						.CHATROOM_REMOVE_SHARE_FILE = 531] = "CHATROOM_REMOVE_SHARE_FILE", e[e
						.CHATROOM_GET_SHARE_FILE_LIST = 532] = "CHATROOM_GET_SHARE_FILE_LIST", e[e
						.CHATROOM_UPLOAD_FILE = 533] = "CHATROOM_UPLOAD_FILE", e[e
						.CHATROOM_SET_META_DATA = 534] = "CHATROOM_SET_META_DATA", e[e
						.CHATROOM_DELETE_META_DATA = 535] = "CHATROOM_DELETE_META_DATA", e[e
						.CHATROOM_FETCH_META_DATA = 536] = "CHATROOM_FETCH_META_DATA", e[e
						.CHATROOM_FETCH_USER_JOINED_CHATROOM = 537] =
					"CHATROOM_FETCH_USER_JOINED_CHATROOM", e[e.CHATROOM_OPERATE = 600] =
					"CHATROOM_OPERATE"
			}(g || (g = {})),
			function(e) {
				e.SDK_INTERNAL = "SDK_INTERNAL", e.LOGIN = "USER_LOGIN", e.REGISTER = "USER_CREATE", e
					.GET_CHATROOM_LIST = "CHATROOM_FETCH_CHATROOMSWITHPAGE", e.CREATE_CHATROOM =
					"CHATROOM_CREATECHATROOM", e.DESTROY_CHATROOM = "CHATROOM_DESTORYCHATROOM", e
					.GET_CHATROOM_DETAIL = "CHATROOM_FETCH_SPECIFICATION", e.MODIFY_CHATROOM =
					"CHATROOM_CHANGE_ATTRIBUTE", e.REMOVE_CHATROOM_MEMBER = "CHATROOM_REMOVE_MEMBER", e
					.MULTI_REMOVE_CHATROOM_MEMBER = "CHATROOM_REMOVE_MEMBERS", e.ADD_USERS_TO_CHATROOM =
					"CHATROOM_ADD_MEMBERS", e.JOIN_CHATROOM = "CHATROOM_JOINCAHTROOM", e.QUIT_CHATROOM =
					"CHATROOM_LEAVECAHTROOM", e.LIST_CHATROOM_MEMBERS = "CHATROOM_FETCH_MEMBERS", e
					.GET_CHATROOM_ADMIN = "CHATROOM_GET_ADMIN", e.SET_CHATROOM_ADMIN =
					"CHATROOM_SET_ADMIN", e.REMOVE_CHATROOM_ADMIN = "CHATROOM_REMOVE_ADMIN", e
					.MUTE_CHATROOM_MEMBER = "CHATROOM_MUTE_USER", e.REMOVE_MUTE_CHATROOM_MEMBER =
					"CHATROOM_UNMUTE_USER", e.GET_MUTE_CHATROOM_MEMBERS = "CHATROOM_FETCH_MUTES", e
					.SET_CHATROOM_MEMBER_TO_BLACK = "CHATROOM_BLOCK_USER", e
					.MULTI_SET_CHATROOM_MEMBER_TO_BLACK = "CHATROOM_BLOCK_USERS", e
					.REMOVE_CHATROOM_MEMBER_BLACK = "CHATROOM_UNBLOCK_USER", e
					.MULTI_REMOVE_CHATROOM_MEMBER_BLACK = "CHATROOM_UNBLOCK_USERS", e
					.GET_CHATROOM_BLOCK_MEMBERS = "CHATROOM_FETCH_BANS", e.DISABLED_CHATROOM_SEND_MSG =
					"CHATROOM_MUTE_ALLMEMEBERS", e.ENABLE_CHATROOM_SEND_MSG =
					"CHATROOM_UNMUTE_ALLMEMEBERS", e.ADD_CHATROOM_WHITE_USERS =
					"CHATROOM_ADD_WHITELIST", e.REMOVE_CHATROOM_WHITE_USERS =
					"CHATROOM_REMOVE_WHITELIST", e.GET_CHATROOM_WHITE_USERS =
					"CHATROOM_FETCH_WHITELIST", e.CHECK_CHATROOM_WHITE_USER =
					"CHATROOM_FETCH_MEMBERIN_WHITELIST", e.GET_CHATROOM_ANN =
					"CHATROOM_FETCH_ANNOUNCEMENT", e.UPDATE_CHATROOM_ANN =
					"CHATROOM_UPDATE_ANNOUNCEMENT", e.DELETE_CHATROOM_FILE =
					"CHATROOM_REMOVE_SHARE_FILE", e.GET_CHATROOM_FILES = "CHATROOM_GET_SHARE_FILE_LIST",
					e.UPLOAD_CHATROOM_FILE = "CHATROOM_UPLOAD_FILE", e.SET_CHATROOM_ATTR =
					"CHATROOM_SET_META_DATA", e.DELETE_CHATROOM_ATTR = "CHATROOM_DELETE_META_DATA", e
					.GET_CHATROOM_ATTR = "CHATROOM_FETCH_META_DATA", e.GET_USER_JOINED_CHATROOM =
					"CHATROOM_FETCH_USER_JOINED_CHATROOM", e.CREATE_GROUP = "GROUP_CREATEGROUP", e
					.BLOCK_GROUP = "GROUP_BLOCK_MESSAGE", e.LIST_GROUP =
					"GROUP_FETCH_PUBLICGROUPS_WITHCURSOR", e.GET_USER_GROUP = "GROUP_FETCH_USERS_GROUP",
					e.CHANGE_OWNER = "GROUP_CHANGE_OWNER", e.GET_GROUP_INFO =
					"GROUP_FETCH_SPECIFICATION", e.MODIFY_GROUP = "GROUP_CHANGE_GROUPATTRIBUTE", e
					.LIST_GROUP_MEMBER = "GROUP_FETCH_MEMEBERS", e.GET_GROUP_ADMIN = "GROUP_GET_ADMIN",
					e.SET_GROUP_ADMIN = "GROUP_SET_ADMIN", e.REMOVE_GROUP_ADMIN = "GROUP_REMOVE_ADMIN",
					e.DISSOLVE_GROUP = "GROUP_DESTOTYGROUP", e.QUIT_GROUP = "GROUP_LEAVEGROUP", e
					.INVITE_TO_GROUP = "GROUP_INVITE_TO_GROUP", e.JOIN_GROUP = "GROUP_JOIN_PUBLICGROUP",
					e.AGREE_JOIN_GROUP = "GROUP_ACCEPT_JOINPUBLICGROUPAPPL", e.REJECT_JOIN_GROUP =
					"GROUP_DECLINE_JOINPUBLICGROUPAPPL", e.AGREE_INVITE_GROUP =
					"GROUP_ACCEPT_INVITATION", e.REJECT_INVITE_GROUP = "GROUP_DECLINE_INVITATION", e
					.REMOVE_GROUP_MEMBER = "GROUP_REMOVE_MEMBER", e.MULTI_REMOVE_GROUP_MEMBER =
					"GROUP_REMOVE_MEMBERS", e.MUTE_GROUP_MEMBER = "GROUP_MUTE_MEMBERS", e
					.UNMUTE_GROUP_MEMBER = "GROUP_UNMUTE_MEMBERS", e.GET_GROUP_MUTE_LIST =
					"GROUP_FETCH_MUTES", e.BLOCK_GROUP_MEMBER = "GROUP_BLOCK_MEMBER", e
					.BLOCK_GROUP_MEMBERS = "GROUP_BLOCK_MEMBERS", e.UNBLOCK_GROUP_MEMBER =
					"GROUP_UNBLOCK_MEMBER", e.UNBLOCK_GROUP_MEMBERS = "GROUP_UNBLOCK_MEMBERS", e
					.GET_GROUP_BLACK_LIST = "GROUP_GET_BLOCK_LIST", e.DISABLED_SEND_GROUP_MSG =
					"GROUP_MUTE_ALLMEMBERS", e.ENABLE_SEND_GROUP_MSG = "GROUP_UNMUTE_ALLMEMBERS", e
					.ADD_USERS_TO_GROUP_WHITE = "GROUP_ADD_WHITELIST", e.REMOVE_GROUP_WHITE_MEMBER =
					"GROUP_REMOVE_WHITELIST", e.GET_GROUP_WHITE_LIST = "GROUP_FETCH_WHITELIST", e
					.IS_IN_GROUP_WHITE_LIST = "GROUP_IS_IN_WHITELIST", e.GET_GROUP_MSG_READ_USER =
					"GROUP_GET_READ_USERS", e.GET_GROUP_ANN = "GROUP_FETCH_ANNOUNCEMENT", e
					.UPDATE_GROUP_ANN = "GROUP_UPDATE_ANNOUNCEMENT", e.UPLOAD_GROUP_FILE =
					"GROUP_UPLOAD_SHAREDFILE", e.DELETE_GROUP_FILE = "GROUP_DELETE_SHAREDFILE", e
					.GET_GROUP_FILE_LIST = "GROUP_FETCH_SHAREDFILE", e.DOWN_GROUP_FILE =
					"GROUP_DOWNLOAD_SHAREDFILE", e.SET_GROUP_MEMBER_ATTRS =
					"GROUP_MEMBER_SET_META_DATA", e.GET_GROUP_MEMBER_ATTR =
					"GROUP_MEMBER_FETCH_META_DATA", e.GET_SESSION_LIST = "REST_GET_SESSION_LIST", e
					.DELETE_SESSION = "REST_DEL_SESSION", e.GET_HISTORY_MSG =
					"REST_GET_HISTORY_MESSAGE", e.PIN_CONVERSATION = "REST_PIN_CONVERSATION", e
					.REST_UPLOAD_FILE_IN_PARTS = "REST_UPLOAD_FILE_IN_PARTS", e
					.REST_DELETE_MESSAGES_CONVERSATIONS = "REST_DELETE_MESSAGES_CONVERSATIONS", e
					.MARK_CONVERSATION = "REST_MARK_CONVERSATION", e.REST_FETCH_PINMESSAGES =
					"REST_FETCH_PINMESSAGES", e.REST_PIN_MESSAGE = "REST_PIN_MESSAGE", e
					.UPDATE_USER_INFO = "USER_UPDATE_USERINFO", e.GET_USER_INFO = "USER_FETCH_USERINFO",
					e.UPDATE_USER_NICK = "USER_UPDATE_NICK", e.UPLOAD_PUSH_TOKEN =
					"USER_UPLOAD_PUSH_TOKEN", e.USER_LOGGEDIN_OTHER_PLATFORM =
					"USER_LOGGEDIN_OTHER_PLATFORM", e.GET_BLACK_LIST = "ROSTER_BLACKLIST", e
					.GET_CONTACTS = "ROSTER_CONTACTS", e.ROSTER_GET_ALL_CONTACTS_REMARKS =
					"ROSTER_GET_ALL_CONTACTS_REMARKS", e
					.ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE =
					"ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE", e.ROSTER_SET_CONTACT_REMARK =
					"ROSTER_SET_CONTACT_REMARK", e.ROSTER_ADD = "ROSTER_ADD", e.ROSTER_REMOVE =
					"ROSTER_REMOVE", e.ROSTER_ACCEPT = "ROSTER_ACCEPT", e.ROSTER_DECLINE =
					"ROSTER_DECLINE", e.ROSTER_BAN = "ROSTER_BAN", e.ROSTER_ALLOW = "ROSTER_ALLOW", e
					.SEND_MSG = "MSYNC_SENDMESSAGE", e.UPLOAD_MSG_ATTACH = "UPLOAD_MSG_ATTACH", e
					.SEND_RECALL_MSG = "MSYNC_RECALLMESSAGE", e.MODIFY_MESSAGE = "MSYNC_MODIFYMESSAGE"
			}(E || (E = {})),
			function(e) {
				e.GET_DNS = "REST_DNSLIST", e.LOGIN_BY_AGORA_TOKEN = "LOGIN_BY_AGORA_TOKEN", e
					.LOGIN_BY_PWD = "LOGIN_BY_PWD", e.RESISTER = "REGISTER", e
					.REST_INIT_UPLOAD_TASK_IN_PARTS = "REST_INIT_UPLOAD_TASK_IN_PARTS", e
					.REST_UPLOAD_PART = "REST_UPLOAD_PART", e.REST_COMPLETE_UPLOAD_PART =
					"REST_COMPLETE_UPLOAD_PART", e.REST_ABORT_UPLOAD_PART = "REST_ABORT_UPLOAD_PART"
			}(y || (y = {})),
			function(e) {
				e[e["5G"] = 7] = "5G", e[e["4G"] = 7] = "4G", e[e["3G"] = 7] = "3G", e[e["2G"] = 7] =
					"2G", e[e["SLOW-2G"] = 7] = "SLOW-2G", e[e.WIFI = 2] = "WIFI", e[e.LAN = 1] = "LAN",
					e[e.DISCONNECTED = 0] = "DISCONNECTED", e[e.NONE = 0] = "NONE", e[e.UNKNOWN = -1] =
					"UNKNOWN", e[e["WEBIM UNABLE TO GET"] = -2] = "WEBIM UNABLE TO GET"
			}(v || (v = {})),
			function(e) {
				e[e.success = 200] = "success", e[e.failed = 500] = "failed", e[e.disconnect = -1] =
					"disconnect", e[e.notFound = 404] = "notFound", e[e.reachLimit = 429] = "reachLimit"
			}(_ || (_ = {})),
			function(e) {
				e[e.web = 0] = "web", e[e.native = 1] = "native"
			}(T || (T = {}));
			var I = new Map,
				S = new Map,
				C = 1e3,
				A = 9675,
				N = -1;

			function M() {
				console.log && (console.log.apply ? console.log.apply(console, Array.prototype.slice
					.call(arguments)) : Function.prototype.apply.apply(console.log, [console,
					arguments
				])), console.trace && console.trace()
			}
			var b, U = "undefined" != typeof window && void 0 !== window.navigator && /Trident\/|MSIE /
				.test(window.navigator.userAgent),
				P = function() {},
				k = {};
			! function(e) {
				e[e.TRACE = 0] = "TRACE", e[e.DEBUG = 1] = "DEBUG", e[e.INFO = 2] = "INFO", e[e.WARN =
					3] = "WARN", e[e.ERROR = 4] = "ERROR", e[e.SILENT = 5] = "SILENT"
			}(b || (b = {}));
			var w = function() {
					function e(e, t, r) {
						this.name = e || "defaultLogger", this.currentLevel = 0, this
							.useCookiePersist = !1, this.storageLogLevelKey = "loglevel", this.levels =
							b, this.consoleLogVisibility = !0, this.logMethods = ["trace", "debug",
								"info", "warn", "error"
							], this.methodFactory = r || this.defaultMethodFactory, this.report = !1;
						var o = this._getPersistedLevel();
						null == o && (o = null === t ? "WARN" : t), this.logs = [], this
						.reportLogs = [], this.reportInterval = 3e5, this.timer = null, this.config = {
								useCache: !1,
								maxCache: 3145728,
								color: "",
								background: ""
							}, this.logBytes = 0, this.setLevel(o, !1, "")
					}
					return e.prototype.reportLog = function() {
						var e, t, r, o, n, i, a;
						return o = this, n = void 0, a = function() {
							var o, n, i, a, s, c, l, u;
							return function(e, t) {
								var r, o, n, i, a = {
									label: 0,
									sent: function() {
										if (1 & n[0]) throw n[1];
										return n[1]
									},
									trys: [],
									ops: []
								};
								return i = {
									next: s(0),
									throw: s(1),
									return: s(2)
								}, "function" == typeof Symbol && (i[Symbol.iterator] =
									function() {
										return this
									}), i;

								function s(i) {
									return function(s) {
										return function(i) {
											if (r) throw new TypeError(
												"Generator is already executing."
												);
											for (; a;) try {
												if (r = 1, o && (n = 2 & i[0] ?
														o.return : i[0] ? o
														.throw || ((n = o
																.return) && n
															.call(o), 0) : o
														.next) && !(n = n.call(
														o, i[1])).done)
											return n;
												switch (o = 0, n && (i = [2 & i[
														0], n.value]), i[0]) {
													case 0:
													case 1:
														n = i;
														break;
													case 4:
														return a.label++, {
															value: i[1],
															done: !1
														};
													case 5:
														a.label++, o = i[1],
															i = [0];
														continue;
													case 7:
														i = a.ops.pop(), a.trys
															.pop();
														continue;
													default:
														if (!((n = (n = a.trys)
																	.length >
																	0 && n[n
																		.length -
																		1]) ||
																6 !== i[0] &&
																2 !== i[0])) {
															a = 0;
															continue
														}
														if (3 === i[0] && (!n ||
																i[1] > n[0] &&
																i[1] < n[3])) {
															a.label = i[1];
															break
														}
														if (6 === i[0] && a
															.label < n[1]) {
															a.label = n[1], n =
																i;
															break
														}
														if (n && a.label < n[
															2]) {
															a.label = n[2], a
																.ops.push(i);
															break
														}
														n[2] && a.ops.pop(), a
															.trys.pop();
														continue
												}
												i = t.call(e, a)
											} catch (e) {
												i = [6, e], o = 0
											} finally {
												r = n = 0
											}
											if (5 & i[0]) throw i[1];
											return {
												value: i[0] ? i[1] : void 0,
												done: !0
											}
										}([i, s])
									}
								}
							}(this, (function(d) {
								switch (d.label) {
									case 0:
										if (0 === (null === (e = this.reportLogs) ||
												void 0 === e ? void 0 : e.length))
											return [2];
										for (o = 2097152, n = this.reportLogs.join(
												"\n") + "\n", i = n.length,
										a = []; i > o;) a.push(n.substring(0, o)),
											i -= o, n = n.substring(o);
										a.push(n), s = 0, c = a, d.label = 1;
									case 1:
										if (!(s < c.length)) return [3, 8];
										if (l = c[s], this.reportLogs = [], !(
												null === (r = null === (t = this
														.connection) || void 0 ===
													t ? void 0 : t.context) ||
												void 0 === r ? void 0 : r
												.accessToken)) return [2];
										d.label = 2;
									case 2:
										return d.trys.push([2, 4, , 5]), [4, this
											.reportData(l)
										];
									case 3:
										return "ok" !== (null == (u = d.sent()) ?
												void 0 : u.status) && this
											.reportLogs.unshift(l), [3, 5];
									case 4:
										return d.sent(), this.reportLogs.unshift(l),
											[3, 5];
									case 5:
										return [4, new Promise((function(e) {
											return setTimeout(e,
												3e3)
										}))];
									case 6:
										d.sent(), d.label = 7;
									case 7:
										return s++, [3, 1];
									case 8:
										return [2]
								}
							}))
						}, new((i = void 0) || (i = Promise))((function(e, t) {
							function r(e) {
								try {
									c(a.next(e))
								} catch (e) {
									t(e)
								}
							}

							function s(e) {
								try {
									c(a.throw(e))
								} catch (e) {
									t(e)
								}
							}

							function c(t) {
								var o;
								t.done ? e(t.value) : (o = t.value, o instanceof i ? o :
									new i((function(e) {
										e(o)
									}))).then(r, s)
							}
							c((a = a.apply(o, n || [])).next())
						}))
					}, e.prototype.reportData = function(e) {
						var t, r = this;
						if (this.connection) {
							var o = this.connection.context || {},
								n = o.orgName,
								i = o.appName,
								a = o.accessToken,
								s = o.userId,
								c = {
									url: "".concat(null === (t = this.connection) || void 0 === t ?
										void 0 : t.apiUrl, "/").concat(n, "/").concat(i,
										"/sdk/users/").concat(s, "/client/logs"),
									type: "POST",
									data: JSON.stringify({
										resource: this.connection.clientResource,
										logContent: e
									}),
									dataType: "json",
									headers: {
										Authorization: "Bearer " + a,
										"Content-Type": "application/json"
									}
								};
							return $.call(this.connection, c).then((function(e) {
								return r.log("report log success", e), e
							})).catch((function(e) {
								r.error("report log error", e)
							}))
						}
						this.error("report log error", "connection is null")
					}, e.prototype._regularlyReportLogs = function() {
						var e, t = this;
						this.timer && clearInterval(this.timer), (null !== (e = this
							.reportInterval) && void 0 !== e ? e : 0) < 6e4 && (this
							.reportInterval = 6e4), this.timer = setInterval((function() {
							t.reportLog()
						}), this.reportInterval || 3e5)
					}, e.prototype._stopReportLogs = function() {
						this.reportLog(), clearInterval(this.timer)
					}, e.prototype.setConfig = function(e) {
						this.config = e
					}, e.prototype.getLevel = function() {
						return this.currentLevel
					}, e.prototype.setLevel = function(e, t, r) {
						if ("string" == typeof e && (e = b[e]), void 0 === e && (e = 0), !(
								"number" == typeof e && e >= 0 && e <= this.levels.SILENT))
						throw Error("log.setLevel() called with invalid level: " + e);
						if (this.currentLevel = e, !1 !== t && this._persistLevel(e), this
							.replaceLoggingMethods(e, r || ""), "undefined" == typeof console && e <
							b.SILENT) throw Error("No console available for logging")
					}, e.prototype.setDefaultLevel = function(e) {
						this._getPersistedLevel() || this.setLevel(e, !1, "")
					}, e.prototype.enableAll = function(e) {
						this.setLevel(this.levels.TRACE, !0, "")
					}, e.prototype.disableAll = function(e) {
						this.setLevel(this.levels.SILENT, !0, "")
					}, e.prototype.getLogs = function() {
						return this.logs
					}, e.prototype.download = function() {
						if ("undefined" != typeof window && "undefined" != typeof document) {
							var e = this.getLogs().join("\n"),
								t = new Blob([e], {
									type: "text/plain;charset=UTF-8"
								}),
								r = window.URL.createObjectURL(t),
								o = document.createElement("a");
							o.style.display = "none", o.href = r, o.setAttribute("download",
								"sdklog"), document.body.appendChild(o), o.click()
						}
					}, e.prototype.setConsoleLogVisibility = function(e) {
						this.consoleLogVisibility = e
					}, e.prototype._bindMethod = function(e, t, r) {
						var o = this,
							n = e[t],
							i = this.getTime();
						if (r) return this._cacheLog;
						if ("function" == typeof n.bind) return function() {
							for (var r = [], i = 0; i < arguments.length; i++) r[i] =
								arguments[i];
							var a = o.getTime();
							o.consoleLogVisibility && n.call.apply(n, function(e, t, r) {
								if (r || 2 === arguments.length)
									for (var o, n = 0, i = t.length; n < i; n++) !
										o && n in t || (o || (o = Array.prototype
											.slice.call(t, 0, n)), o[n] = t[n]);
								return e.concat(o || Array.prototype.slice.call(t))
							}([e, "".concat(a, " IM SDK [").concat("log" === t ?
								"debug" : t, "]: ")], r, !1)), o.onLog && o.onLog({
								time: a,
								level: "log" === t ? "debug" : t,
								logs: r
							}), o._cacheReportLogs.apply(o, r)
						};
						try {
							return Function.prototype.bind.call(n, e, "".concat(i, " IM SDK [")
								.concat("log" === t ? "debug" : t, "]: "))
						} catch (t) {
							return function() {
								return Function.prototype.apply.apply(n, [e, arguments])
							}
						}
					}, e.prototype.getTime = function() {
						var e = new Date;
						return e.toTimeString().split(" ")[0] + ":" + e.getMilliseconds()
					}, e.prototype._cacheLog = function() {
						for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
						var r = (new Date).toLocaleString() + ": ",
							o = "";
						e.forEach((function(e) {
							o += "object" == typeof e ? JSON.stringify(e) + " " : e +
								" "
						})), this._cacheLogCall(r + o), this._cacheReportLogs.apply(this, e)
					}, e.prototype._cacheLogCall = function(e) {
						var t = e.length,
							r = this.logBytes + t,
							o = this.config.maxCache;
						if (!(t >= o)) {
							if (r < o) this.logBytes += t;
							else
								for (var n = r - o, i = 0; i < n;) {
									var a = this.logs.shift();
									void 0 !== a && (i += a.length)
								}
							this.logs.push(e)
						}
					}, e.prototype._cacheReportLogs = function() {
						for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
						if (this.report) {
							var r = (new Date).toLocaleString() + ": ",
								o = "";
							e.forEach((function(e) {
								o += "object" == typeof e ? JSON.stringify(e) + " " :
									e + " "
							})), this.reportLogs.push(r + o)
						}
					}, e.prototype._getPersistedLevel = function() {
						var e;
						if ("undefined" == typeof window) return 5;
						if ("undefined" === (e = window && window.localStorage && window
								.localStorage[this.storageLogLevelKey])) {
							var t = window.document.cookie,
								r = t.indexOf(encodeURIComponent(this.storageLogLevelKey)); - 1 !==
								r && (e = /^([^;]+)/.exec(t.slice(r))[1])
						}
						return e || 5
					}, e.prototype._persistLevel = function(e) {
						var t = this.logMethods[e] || "SILENT";
						"undefined" != typeof window && (window.localStorage && (window
								.localStorage[this.storageLogLevelKey] = t), this
							.useCookiePersist && (window.document.cookie = encodeURIComponent(
								this.storageLogLevelKey) + "=" + t + ";"))
					}, e.prototype.replaceLoggingMethods = function(e, t) {
						for (var r = this, o = 0; o < this.logMethods.length; o++) {
							var n = this.logMethods[o];
							this[n] = o < e ? function() {
								for (var e = [], t = 0; t < arguments.length; t++) e[t] =
									arguments[t];
								r.report && r._cacheReportLogs.apply(r, e)
							} : this.methodFactory(n, e, t)
						}
						this.log = this.debug
					}, e.prototype.defaultMethodFactory = function(e, t, r) {
						return this.realMethod(e) || this.enableLoggingWhenConsoleArrives.apply(
							this, [e, t, r])
					}, e.prototype.realMethod = function(e) {
						return "debug" === e && (e = "log"), "undefined" != typeof console && (
							"trace" === e && U ? M : void 0 !== console[e] ? this._bindMethod(
								console, e, this.config.useCache) : void 0 !== console.log ?
							this._bindMethod(console, "log", this.config.useCache) : P)
					}, e.prototype.enableLoggingWhenConsoleArrives = function(e, t, r) {
						return function() {
							"undefined" != typeof console && (this.replaceLoggingMethods.call(
								this, t, r), this[e].apply(this, arguments))
						}.bind(this)
					}, e
				}(),
				L = new w;
			L.getLogger = function(e) {
				if ("string" != typeof e || "" === e) throw new TypeError(
					"You must supply a name when creating a logger.");
				return this
			};
			var D = "undefined" != typeof window ? window.log : void 0;
			L.noConflict = function() {
				return "undefined" != typeof window && window.log === L && (window.log = D), L
			}, L.getLoggers = function() {
				return k
			}, L.initReport = function(e) {
				var t = e.report,
					r = e.reportInterval,
					o = e.connection;
				L.report = t, L.reportInterval = r, L.connection = o, t && L._regularlyReportLogs()
			};
			var x = L,
				G = 5242880,
				B = 5242880,
				H = {
					size: 0
				},
				j = function() {
					return j = Object.assign || function(e) {
						for (var t, r = 1, o = arguments.length; r < o; r++)
							for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t,
								n) && (e[n] = t[n]);
						return e
					}, j.apply(this, arguments)
				};

			function F() {
				var e = this.context,
					t = e.orgName,
					r = e.appName,
					o = e.accessToken,
					n = {
						url: "".concat(this.apiUrl, "/").concat(t, "/").concat(r,
							"/sdk/chatfiles/part-upload"),
						dataType: "json",
						type: "POST",
						headers: {
							Authorization: "Bearer " + o
						}
					};
				return x.debug("Call multipartInit"), $.call(this, n, E.SDK_INTERNAL).then((function(
				e) {
					var t = e.entities[0];
					return {
						data: {
							fileMaxSize: t.file_upper_limit,
							partMinSize: t.part_lower_limit,
							uuid: t.uuid
						},
						extraInfo: e.extraInfo,
						type: e.type
					}
				}))
			}

			function W(e) {
				var t = this;
				return new Promise((function(r, o) {
					var n, i, a = (new Date).getTime(),
						s = t.context,
						c = s.orgName,
						l = s.appName,
						u = s.accessToken,
						p = e.uuid,
						h = e.partNumber,
						f = e.part,
						m = e.onProgress,
						g = "".concat(t.apiUrl, "/").concat(c, "/").concat(l,
							"/sdk/chatfiles/part-upload/").concat(p),
						E = new XMLHttpRequest;
					x.debug("Call multipartUpload"), E.upload && (null === (i = (n = E
						.upload).addEventListener) || void 0 === i || i.call(n,
						"progress", (function(e) {
							null == m || m(e)
						}), !1)), E.addEventListener("abort", (function() {
						o({
							type: d.REQUEST_ABORT,
							message: "Request Abort",
							errorType: "onabort",
							xhr: E,
							extraInfo: {
								elapse: (new Date).getTime() - a,
								httpCode: E.status || -1,
								errDesc: "Request Abort",
								url: g
							}
						})
					}), !1), E.addEventListener("error", (function() {
						o({
							type: d.WEBIM_UPLOADFILE_ERROR,
							data: E,
							extraInfo: {
								elapse: (new Date).getTime() - a,
								httpCode: E.status || -1,
								errDesc: "request error",
								url: g
							}
						})
					}), !1), E.addEventListener("load", (function() {
						try {
							var e = JSON.parse(E.responseText);
							if (200 !== E.status) return o({
								type: d.WEBIM_UPLOADFILE_ERROR,
								data: e,
								extraInfo: {
									elapse: (new Date).getTime() -
										a,
									httpCode: E.status || -1,
									errDesc: "part upload failed",
									url: g
								}
							}), !1;
							try {
								r(j(j({}, e), {
									extraInfo: {
										elapse: (new Date)
										.getTime() - a,
										httpCode: E.status || -1,
										url: g
									}
								}))
							} catch (e) {
								o({
									type: d
										.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,
									data: e,
									extraInfo: {
										elapse: (new Date).getTime() -
											a,
										httpCode: E.status || -1,
										errDesc: "part upload failed",
										url: g
									}
								})
							}
						} catch (e) {
							o({
								type: d.WEBIM_UPLOADFILE_ERROR,
								data: E.responseText,
								extraInfo: {
									elapse: (new Date).getTime() - a,
									httpCode: E.status || -1,
									errDesc: "part upload failed",
									url: g
								}
							})
						}
					}), !1);
					var y = new FormData;
					y.append("part_file", f), y.append("part_number", h), E.open("PUT", g),
						E.setRequestHeader("restrict-access", "true"), E.setRequestHeader(
							"Accept", "*/*"), E.setRequestHeader("Authorization",
							"Bearer " + u), E.send(y)
				}))
			}

			function K(e) {
				var t = e.uuid,
					r = e.thumbnailHeight,
					o = e.thumbnailWidth,
					n = this.context,
					i = n.orgName,
					a = n.appName,
					s = n.accessToken,
					c = "".concat(this.apiUrl, "/").concat(i, "/").concat(a,
						"/sdk/chatfiles/part-upload/").concat(t, "?restrict-access=true");
				o && (c += "&thumbnail-width=".concat(o)), r && (c += "&thumbnail-height=".concat(r));
				var l = {
					url: c,
					dataType: "json",
					type: "POST",
					headers: {
						Authorization: "Bearer " + s
					}
				};
				return x.debug("Call multipartComplete"), $.call(this, l, E.SDK_INTERNAL)
			}

			function q(e) {
				var t = e.uuid,
					r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n,
							"/sdk/chatfiles/part-upload/").concat(t),
						dataType: "json",
						type: "DELETE",
						headers: {
							Authorization: "Bearer " + i
						}
					};
				return x.debug("Call multipartAbort"), $.call(this, a, E.SDK_INTERNAL)
			}
			var z = function(e, t, r, o) {
					return new(r || (r = Promise))((function(n, i) {
						function a(e) {
							try {
								c(o.next(e))
							} catch (e) {
								i(e)
							}
						}

						function s(e) {
							try {
								c(o.throw(e))
							} catch (e) {
								i(e)
							}
						}

						function c(e) {
							var t;
							e.done ? n(e.value) : (t = e.value, t instanceof r ? t : new r((
								function(e) {
									e(t)
								}))).then(a, s)
						}
						c((o = o.apply(e, t || [])).next())
					}))
				},
				V = function(e, t) {
					var r, o, n, i, a = {
						label: 0,
						sent: function() {
							if (1 & n[0]) throw n[1];
							return n[1]
						},
						trys: [],
						ops: []
					};
					return i = {
						next: s(0),
						throw: s(1),
						return: s(2)
					}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
						return this
					}), i;

					function s(i) {
						return function(s) {
							return function(i) {
								if (r) throw new TypeError("Generator is already executing.");
								for (; a;) try {
									if (r = 1, o && (n = 2 & i[0] ? o.return : i[0] ? o
											.throw || ((n = o.return) && n.call(o), 0) : o
											.next) && !(n = n.call(o, i[1])).done) return n;
									switch (o = 0, n && (i = [2 & i[0], n.value]), i[0]) {
										case 0:
										case 1:
											n = i;
											break;
										case 4:
											return a.label++, {
												value: i[1],
												done: !1
											};
										case 5:
											a.label++, o = i[1], i = [0];
											continue;
										case 7:
											i = a.ops.pop(), a.trys.pop();
											continue;
										default:
											if (!((n = (n = a.trys).length > 0 && n[n
														.length - 1]) || 6 !== i[0] && 2 !==
													i[0])) {
												a = 0;
												continue
											}
											if (3 === i[0] && (!n || i[1] > n[0] && i[1] <
													n[3])) {
												a.label = i[1];
												break
											}
											if (6 === i[0] && a.label < n[1]) {
												a.label = n[1], n = i;
												break
											}
											if (n && a.label < n[2]) {
												a.label = n[2], a.ops.push(i);
												break
											}
											n[2] && a.ops.pop(), a.trys.pop();
											continue
									}
									i = t.call(e, a)
								} catch (e) {
									i = [6, e], o = 0
								} finally {
									r = n = 0
								}
								if (5 & i[0]) throw i[1];
								return {
									value: i[0] ? i[1] : void 0,
									done: !0
								}
							}([i, s])
						}
					}
				},
				J = function() {
					function e(e, t) {
						var r = this;
						this.handleUploadProgress = function(e, t) {
								var o, n;
								if (e.total) {
									r.progressArr[t] = e.loaded;
									var i = r.progressArr.reduce((function(e, t) {
										return e + t
									}), 0);
									null === (n = (o = r.options).onFileUploadProgress) || void 0 ===
										n || n.call(o, {
											isTrusted: e.isTrusted,
											type: e.type,
											loaded: i > r.file.size ? r.file.size : i,
											total: r.file.size,
											lengthComputable: e.lengthComputable
										})
								}
							}, this.uuid = "", this.pool = [], this.progressArr = [], this.connection =
							e, this.options = t, this.partSize = G, this.file = t.file, this.init(),
							this.rpt = this.connection.dataReport.geOperateFun({
								operationName: E.REST_UPLOAD_FILE_IN_PARTS
							})
					}
					return e.prototype.init = function() {
						var e, t, r, o;
						return z(this, void 0, void 0, (function() {
							var n, i, a, s, c, l, u, p, h, f, m, g, E, v, _;
							return V(this, (function(T) {
								switch (T.label) {
									case 0:
										return T.trys.push([0, 4, , 6]), [4,
											F.call(this.connection)
										];
									case 1:
										return n = T.sent(), i = n.data ||
											{}, a = i.fileMaxSize, s =
											void 0 === a ? 0 : a, c = i
											.partMinSize, l = void 0 === c ?
											G : c, u = i.uuid, p =
											void 0 === u ? "" : u, h = n
											.extraInfo, g = h.elapse, E = h
											.httpCode, _ = h.url, this
											.partSize = l, this.uuid = p, H
											.size = l, x.debug(
												"multipartInit success",
												"uuid: ".concat(p),
												"fileMaxSize: ".concat(s),
												"partMinSize: ".concat(l)),
											this.file.size > s ? [4, this
												.multipartAbort()
											] : [3, 3];
									case 2:
										return T.sent(), null === (t = (e =
													this.options)
												.onFileUploadError) ||
											void 0 === t || t.call(e, {
												code: d
													.WEBIM_UPLOADFILE_ERROR,
												message: "The file size exceeds the maximum limit"
											}), [2];
									case 3:
										return this.rpt({
											data: {
												requestUrl: _,
												requestName: y
													.REST_INIT_UPLOAD_TASK_IN_PARTS,
												requestElapse: g,
												requestMethod: "POST",
												isSuccess: 1,
												code: E
											}
										}), this.upload(), [3, 6];
									case 4:
										return f = T.sent(), m = (null ==
												f ? void 0 : f.extraInfo) ||
											{}, g = m.elapse, E = m
											.httpCode, v = m.errDesc, _ = m
											.url, this.rpt({
												data: {
													requestUrl: _,
													requestName: y
														.REST_INIT_UPLOAD_TASK_IN_PARTS,
													requestElapse: g,
													requestMethod: "POST",
													isSuccess: 0,
													codeDesc: v,
													code: E
												}
											}), [4, this.multipartAbort()];
									case 5:
										return T.sent(), null === (o =
												null === (r = this
												.options) || void 0 === r ?
												void 0 : r.onInitFail) ||
											void 0 === o || o.call(r), [3,
												6];
									case 6:
										return [2]
								}
							}))
						}))
					}, e.prototype.upload = function() {
						var e, t, r;
						return z(this, void 0, void 0, (function() {
							var o, n, i, a, s, c, l = this;
							return V(this, (function(u) {
								switch (u.label) {
									case 0:
										(new FileReader).readAsArrayBuffer(
												this.file), o = this.file
											.size, n = Math.ceil(o / this
												.partSize), u.label = 1;
									case 1:
										u.trys.push([1, 7, , 9]), i =
											function(t) {
												var r, n, i, s;
												return V(this, (function(
												c) {
													switch (c
														.label
														) {
														case 0:
															return r =
																t *
																a
																.partSize,
																n =
																Math
																.min(
																	o,
																	r +
																	a
																	.partSize
																	),
																i =
																null ===
																(e = a
																	.file
																	) ||
																void 0 ===
																e ?
																void 0 :
																e
																.slice(
																	r,
																	n
																	),
																(s = W
																	.call(
																		a
																		.connection, {
																			uuid: a
																				.uuid,
																			partNumber: ""
																				.concat(
																					t +
																					1
																					),
																			part: i,
																			onProgress: function(
																				e
																				) {
																				l.handleUploadProgress(
																					e,
																					t
																					)
																			}
																		}
																		)
																	)
																.then(
																	(function(
																		e
																		) {
																		var t =
																			(null ==
																				e ?
																				void 0 :
																				e
																				.extraInfo
																				) ||
																			{},
																			r =
																			t
																			.elapse,
																			o =
																			t
																			.httpCode,
																			n =
																			t
																			.url;
																		l.rpt({
																				data: {
																					requestUrl: n,
																					requestName: y
																						.REST_UPLOAD_PART,
																					requestElapse: r,
																					isSuccess: 1,
																					requestMethod: "PUT",
																					code: o
																				}
																			}),
																			l
																			.handleTask(
																				s
																				)
																	})
																	),
																s
																.catch(
																	(function(
																		e
																		) {
																		var t =
																			(null ==
																				e ?
																				void 0 :
																				e
																				.extraInfo
																				) ||
																			{},
																			r =
																			t
																			.elapse,
																			o =
																			t
																			.httpCode,
																			n =
																			t
																			.url,
																			i =
																			t
																			.errDesc;
																		l.rpt({
																				data: {
																					requestUrl: n,
																					requestName: y
																						.REST_UPLOAD_PART,
																					requestElapse: r,
																					isSuccess: 0,
																					requestMethod: "PUT",
																					code: o,
																					codeDesc: i
																				}
																			}),
																			delete e
																			.extraInfo
																	})
																	),
																a
																.pool
																.push(
																	s
																	),
																4 !==
																a
																.pool
																.length ?
																[3,
																	2] :
																[4, Promise
																	.race(
																		a
																		.pool
																		)
																];
														case 1:
															c.sent(),
																c
																.label =
																2;
														case 2:
															return [
																2]
													}
												}))
											}, a = this, s = 0, u.label = 2;
									case 2:
										return s < n ? [5, i(s)] : [3, 5];
									case 3:
										u.sent(), u.label = 4;
									case 4:
										return s++, [3, 2];
									case 5:
										return [4, Promise.all(this.pool)];
									case 6:
										return u.sent(), this
											.multipartComplete(), [3, 9];
									case 7:
										return c = u.sent(), [4, this
											.multipartAbort()
										];
									case 8:
										return u.sent(), this.rpt({
												data: {
													isLastApi: 1,
													isSuccess: 0
												}
											}), null === (r = (t = this
													.options)
												.onFileUploadError) ||
											void 0 === r || r.call(t, c), [
												3, 9
											];
									case 9:
										return [2]
								}
							}))
						}))
					}, e.prototype.multipartComplete = function() {
						var e, t, r, o;
						return z(this, void 0, void 0, (function() {
							var n, i, a, s, c, l, u, d, p, h, f;
							return V(this, (function(m) {
								switch (m.label) {
									case 0:
										return m.trys.push([0, 2, , 3]), n =
											this.options.thumbnailInfo ||
											{}, i = n.width, a = n.height, [
												4, K.call(this.connection, {
													uuid: this.uuid,
													thumbnailHeight: a,
													thumbnailWidth: i
												})
											];
									case 1:
										return s = m.sent(), c = (null ==
												s ? void 0 : s.extraInfo) ||
											{}, d = c.elapse, p = c
											.httpCode, f = c.url, this.rpt({
												data: {
													requestUrl: f,
													requestName: y
														.REST_COMPLETE_UPLOAD_PART,
													requestElapse: d,
													requestMethod: "POST",
													isSuccess: 1,
													code: p
												}
											}), this.rpt({
												data: {
													isLastApi: 1,
													isSuccess: 1
												}
											}), null === (t = (e = this
													.options)
												.onFileUploadComplete) ||
											void 0 === t || t.call(e, s), [
												3, 3
											];
									case 2:
										return l = m.sent(), u = (null ==
												l ? void 0 : l.extraInfo) ||
											{}, d = u.elapse, p = u
											.httpCode, h = u.errDesc, f = u
											.url, this.rpt({
												data: {
													requestUrl: f,
													requestName: y
														.REST_COMPLETE_UPLOAD_PART,
													requestElapse: d,
													requestMethod: "POST",
													isSuccess: 0,
													codeDesc: h,
													code: p
												}
											}), this.rpt({
												data: {
													isLastApi: 1,
													isSuccess: 0
												}
											}), null === (o = (r = this
													.options)
												.onFileUploadError) ||
											void 0 === o || o.call(r, l), [
												3, 3
											];
									case 3:
										return [2]
								}
							}))
						}))
					}, e.prototype.multipartAbort = function() {
						return z(this, void 0, void 0, (function() {
							var e, t, r, o, n, i, a, s;
							return V(this, (function(c) {
								switch (c.label) {
									case 0:
										if (!this.uuid) return [2];
										c.label = 1;
									case 1:
										return c.trys.push([1, 3, , 4]), [4,
											q.call(this.connection, {
												uuid: this.uuid
											})
										];
									case 2:
										return e = c.sent(), t = (null ==
												e ? void 0 : e.extraInfo) ||
											{}, n = t.elapse, i = t
											.httpCode, s = t.url, this.rpt({
												data: {
													requestUrl: s,
													requestName: y
														.REST_ABORT_UPLOAD_PART,
													requestElapse: n,
													requestMethod: "DELETE",
													isSuccess: 1,
													code: i
												}
											}), [3, 4];
									case 3:
										return r = c.sent(), o = (null ==
												r ? void 0 : r.extraInfo) ||
											{}, n = o.elapse, i = o
											.httpCode, a = o.errDesc, s = o
											.url, this.rpt({
												data: {
													requestUrl: s,
													requestName: y
														.REST_ABORT_UPLOAD_PART,
													requestElapse: n,
													requestMethod: "DELETE",
													isSuccess: 0,
													codeDesc: a,
													code: i
												}
											}), [3, 4];
									case 4:
										return [2]
								}
							}))
						}))
					}, e.prototype.handleTask = function(e) {
						var t = this.pool.findIndex((function(t) {
							return t === e
						}));
						this.pool.splice(t, 1)
					}, e
				}(),
				X = function(e) {
					var t, r, o = this,
						n = (new Date).getTime(),
						i = e.apiUrl,
						a = e.orgName,
						s = e.appName,
						c = e.operateName,
						l = e.accessToken,
						u = e.uploadUrl || "".concat(i, "/").concat(a, "/").concat(s, "/chatfiles"),
						p = function(t) {
							var r = (new Date).getTime() - n;
							o.dataReport && c && [E.UPLOAD_MSG_ATTACH, E.UPLOAD_CHATROOM_FILE, E
								.UPLOAD_GROUP_FILE
							].includes(c) && o.dataReport.geOperateFun({
								operationName: c
							})({
								isEndApi: !0,
								data: {
									isSuccess: 0,
									requestMethod: "POST",
									requestName: c,
									requestElapse: r,
									requestUrl: u,
									code: (null == h ? void 0 : h.status) || 0,
									codeDesc: "upload file error"
								}
							}), e.onFileUploadError && e.onFileUploadError(t)
						},
						h = new XMLHttpRequest;
					h.upload && (null === (r = (t = h.upload).addEventListener) || void 0 === r || r
							.call(t, "progress", e.onFileUploadProgress || Q, !1)), h.addEventListener(
							"abort", e.onFileUploadCanceled || Q, !1), h.addEventListener("error", (
							function(e) {
								p({
									type: d.WEBIM_UPLOADFILE_ERROR,
									data: h
								})
							}), !1), h.addEventListener("load", (function(t) {
							try {
								var r = JSON.parse(h.responseText);
								if (400 === h.status) return p({
									type: d.WEBIM_UPLOADFILE_ERROR,
									data: r
								}), !1;
								try {
									! function(t) {
										var r = (new Date).getTime() - n;
										o.dataReport && c && [E.UPLOAD_MSG_ATTACH, E
												.UPLOAD_CHATROOM_FILE, E.UPLOAD_GROUP_FILE
											].includes(c) && o.dataReport.geOperateFun({
												operationName: c
											})({
												isEndApi: !0,
												data: {
													isSuccess: (null == t ? void 0 : t
														.error) ? 0 : 1,
													requestMethod: "POST",
													requestName: c,
													requestElapse: r,
													requestUrl: u,
													code: h.status,
													codeDesc: (null == t ? void 0 : t
														.error_description) || ""
												}
											}), e.onFileUploadComplete && e
											.onFileUploadComplete(t)
									}(r)
								} catch (t) {
									p({
										type: d.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,
										data: t
									})
								}
							} catch (t) {
								p({
									type: d.WEBIM_UPLOADFILE_ERROR,
									data: h.responseText
								})
							}
						}), !1), h.open("POST", u), h.setRequestHeader("restrict-access", "true"), h
						.setRequestHeader("Accept", "*/*"), h.setRequestHeader("Authorization",
							"Bearer " + l);
					var f = new FormData;
					f.append("file", e.file.data), e.thumbnailWidth && f.append("thumbnail-width", e
						.thumbnailWidth + ""), e.thumbnailHeight && f.append("thumbnail-height", e
						.thumbnailHeight + ""), h.send(f)
				},
				Y = function() {
					return Y = Object.assign || function(e) {
						for (var t, r = 1, o = arguments.length; r < o; r++)
							for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t,
								n) && (e[n] = t[n]);
						return e
					}, Y.apply(this, arguments)
				},
				Q = function() {};

			function $(e, t) {
				var r, o = this;
				return ie().platform === re.WEB ? new Promise((function(t, o) {
					var n = e.dataType || "text",
						i = e.success || Q,
						a = e.error || Q,
						s = new XMLHttpRequest;
					s.ontimeout = function() {
						o({
							type: d.REQUEST_TIMEOUT,
							message: "Request Timeout",
							errorType: "timeout_error",
							xhr: s
						})
					}, s.onerror = function() {
						o({
							type: d.REQUEST_UNKNOWN,
							message: "Request Unknow Error",
							errorType: "onerror",
							xhr: s
						})
					}, s.onabort = function() {
						o({
							type: d.REQUEST_ABORT,
							message: "Request Abort",
							errorType: "onabort",
							xhr: s
						})
					}, s.onreadystatechange = function() {
						if (4 === s.readyState) {
							var e = (new Date).getTime() - r,
								c = s.status || 0,
								l = {
									elapse: e,
									httpCode: c
								};
							if (200 === c) {
								de.ajaxUnconventionalErrorTimes = 0;
								try {
									switch (n) {
										case "text":
											return i(s.responseText), void t(s
												.responseText);
										case "json":
											var u = JSON.parse(s.responseText);
											return u.extraInfo = l, i(u), void t(u);
										case "xml":
											return s.responseXML && s.responseXML
												.documentElement ? (i(s.responseXML
													.documentElement), void t(s
													.responseXML.documentElement)) : (
											a({
													type: d
														.WEBIM_CONNCTION_AJAX_ERROR,
													data: s.responseText,
													message: "XHR.responseXML is null or XHR.responseXML.documentElement is null"
												}), void o({
													type: d
														.WEBIM_CONNCTION_AJAX_ERROR,
													data: s.responseText,
													message: "XHR.responseXML is null or XHR.responseXML.documentElement is null"
												}));
										default:
											a({
												type: d
													.WEBIM_CONNCTION_AJAX_ERROR,
												data: s.responseText,
												message: "Invalid dataType"
											}), o({
												type: d
													.WEBIM_CONNCTION_AJAX_ERROR,
												data: s.responseText,
												message: "Invalid dataType"
											})
									}
									return t(s.response || s.responseText), void i(s
										.response || s.responseText, s)
								} catch (e) {
									o(e)
								}
								return
							} [400, 401, 403, 404, 429, 500, 503].includes(c) || (x
								.debug("rest api request fail status:", c), de
								.ajaxUnconventionalErrorTimes++), O(s, o, a, e)
						}
						0 === s.readyState && (a({
							type: d.WEBIM_CONNCTION_AJAX_ERROR,
							data: s.responseText,
							message: "Request not initialized"
						}), o({
							type: d.WEBIM_CONNCTION_AJAX_ERROR,
							data: s.responseText,
							message: "Request not initialized"
						}))
					}, e.responseType && s.responseType && (s.responseType = e
						.responseType), e.mimeType && s.overrideMimeType(e.mimeType);
					var c = e.type || "POST",
						l = e.data || null,
						u = "";
					if ("get" === c.toLowerCase() && l) {
						for (var p in l) l.hasOwnProperty(p) && (u += p + "=" + l[p] + "&");
						u = u ? u.slice(0, -1) : u, e.url += (e.url.indexOf("?") > 0 ? "&" :
								"?") + (u ? u + "&" : u) + "_v=" + (new Date).getTime(), l =
							null, u = ""
					}
					r = (new Date).getTime(), s.open(c, e.url);
					var h = e.headers || {};
					for (var f in h["Content-Type"] || (h["Content-Type"] =
							"application/json"), h) h.hasOwnProperty(f) && s
						.setRequestHeader(f, h[f]);
					s.send(l)
				})).then((function(r) {
					return o.dataReport && t && t !== E.SDK_INTERNAL && o.dataReport
						.geOperateFun({
							operationName: t
						})({
							isEndApi: !0,
							data: Y({
								isSuccess: 1,
								requestUrl: e.url,
								requestName: t,
								requestMethod: e.type
							}, le(r.extraInfo))
						}), t === E.SDK_INTERNAL && (r.extraInfo.url = e.url), t !== E
						.SDK_INTERNAL && delete r.extraInfo, "Object" === Z(r) ? Y(Y({},
						r), {
							type: d.REQUEST_SUCCESS
						}) : {
							data: r,
							type: d.REQUEST_SUCCESS
						}
				})).catch((function(r) {
					throw o.dataReport && t && t !== E.SDK_INTERNAL && o.dataReport
						.geOperateFun({
							operationName: t
						})({
							isEndApi: !0,
							data: Y({
								isSuccess: 0,
								requestUrl: e.url,
								requestName: t,
								requestMethod: e.type
							}, le(r.extraInfo))
						}), t === E.SDK_INTERNAL && (r.extraInfo.url = e.url), t !== E
						.SDK_INTERNAL && delete r.extraInfo, r
				})) : ee.call(this, e, t)
			}

			function Z(e) {
				return Object.prototype.toString.call(e).slice(8, -1)
			}

			function ee(e, t) {
				var r = this;
				return new Promise((function(t, r) {
					var o = e.success || Q,
						n = e.error || Q,
						i = e.type || "POST",
						a = e.data || null,
						s = "",
						c = (new Date).getTime(),
						l = de.getEnvInfo();
					if ("get" === i.toLowerCase() && a) {
						for (var u in a) a.hasOwnProperty(u) && (s += u + "=" + a[u] + "&");
						s = s ? s.slice(0, -1) : s, e.url += (e.url.indexOf("?") > 0 ? "&" :
								"?") + (s ? s + "&" : s) + "_v=" + (new Date).getTime(), a =
							null, s = ""
					}
					var d = {
						url: e.url,
						data: e.data,
						method: i,
						headers: {},
						success: function(e) {
							var i, a, s, l, u, d = {
								elapse: (new Date).getTime() - c,
								httpCode: Number((null === (i = e.statusCode) ||
									void 0 === i ? void 0 : i.toString()
									) || (null === (a = e.status) ||
									void 0 === a ? void 0 : a.toString()
									)),
								errDesc: (null === (s = null == e ? void 0 : e
										.data) || void 0 === s ? void 0 : s
									.error_description) || ""
							};
							if ("200" === (null === (l = e.statusCode) || void 0 ===
									l ? void 0 : l.toString()) || "200" === (
									null === (u = e.status) || void 0 === u ?
									void 0 : u.toString())) {
								e.data.extraInfo = d;
								var p = e.data;
								o(p), t(p)
							} else e.extraInfo = d, n(p = e), r(p)
						},
						complete: function() {},
						fail: function(e) {
							var t = {
								elapse: (new Date).getTime() - c,
								httpCode: N,
								errDesc: "request:fail"
							};
							e.extraInfo = t, e.data = {
								error: "request:fail",
								error_description: "request:fail"
							}, n(e), r(e)
						}
					};
					if ("zfb" === l.platform || "dd" === l.platform ? d.headers = e
						.headers : d.header = e.headers, "dd" === l.platform) return dd
						.httpRequest(d);
					l.global.request(d)
				})).then((function(o) {
					return r.dataReport && t && t !== E.SDK_INTERNAL && r.dataReport
						.geOperateFun({
							operationName: t
						})({
							isEndApi: !0,
							data: Y({
								isSuccess: 1,
								requestUrl: e.url,
								requestName: t,
								requestMethod: e.type
							}, le(o.extraInfo))
						}), t !== E.SDK_INTERNAL && delete o.extraInfo, "Object" === Z(o) ?
						Y(Y({}, o), {
							type: d.REQUEST_SUCCESS
						}) : {
							data: o,
							type: d.REQUEST_SUCCESS
						}
				})).catch((function(o) {
					throw r.dataReport && t && t !== E.SDK_INTERNAL && r.dataReport
						.geOperateFun({
							operationName: t
						})({
							isEndApi: !0,
							data: Y({
								isSuccess: 0,
								requestUrl: e.url,
								requestName: t,
								requestMethod: e.type
							}, le(o.extraInfo))
						}), t !== E.SDK_INTERNAL && delete o.extraInfo, o
				}))
			}

			function te(e, t) {
				var r;
				return function() {
					for (var o = [], n = 0; n < arguments.length; n++) o[n] = arguments[n];
					if (!e) return r;
					r = t ? e.apply(t, o) : e.apply(void 0, o), e = null
				}
			}
			var re, oe = te((function(e, t) {
					var r = ie();
					if (r.platform !== re.WEB) {
						var o = r.global,
							n = function(r) {
								r.isConnected ? e() : t()
							};
						o.offNetworkStatusChange && o.offNetworkStatusChange(n), o
							.onNetworkStatusChange && o.onNetworkStatusChange(n)
					} else "undefined" != typeof addEventListener && (window.addEventListener(
						"online", e), window.addEventListener("offline", t))
				})),
				ne = te((function(e, t) {
					var r, o, n = ie();
					if (n.platform === re.WEB) document && document.addEventListener(
						"visibilitychange", (function() {
							document.hidden ? null == t || t() : null == e || e()
						}), !1);
					else {
						var i = n.global;
						i.onAppShow && (null === (r = i.onAppShow) || void 0 === r || r.call(i,
							e)), i.onAppHide && (null === (o = i.onAppHide) || void 0 ===
							o || o.call(i, t))
					}
				}));

			function ie() {
				return "undefined" != typeof swan && ae(swan) ? {
					platform: re.BAIDU,
					global: swan
				} : "undefined" != typeof tt && ae(tt) ? {
					platform: re.TT,
					global: tt
				} : "undefined" != typeof dd && ae(dd) ? {
					platform: re.DD,
					global: dd
				} : "undefined" != typeof my && ae(my) ? {
					platform: re.ZFB,
					global: my
				} : "undefined" != typeof wx && ae(wx) ? {
					platform: re.WX,
					global: wx
				} : "undefined" != typeof qq && ae(qq) ? {
					platform: re.QQ,
					global: qq
				} : "undefined" != typeof uni && ae(uni) ? {
					platform: re.UNI,
					global: uni
				} : "undefined" != typeof window && window.WebSocket ? {
					platform: re.WEB,
					global: window
				} : {
					platform: re.NODE,
					global: r.g || {}
				}
			}

			function ae(e) {
				for (var t = ["canIUse", "getSystemInfo"], r = 0, o = t.length; r < o; r++)
					if (!e[t[r]]) return !1;
				return !0
			}

			function se(e, t) {
				var r, o, n, i = this,
					a = e.accessToken,
					s = e.appKey,
					c = null === (o = null === (r = null == e ? void 0 : e.file) || void 0 === r ?
						void 0 : r.data) || void 0 === o ? void 0 : o.size,
					l = [],
					u = "",
					p = "";
				if (a)
					if (s && (l = s.split("#"), u = l[0], p = l[1]), u || p)
						if (c <= 0) e.onFileUploadError && e.onFileUploadError({
							type: d.WEBIM_UPLOADFILE_ERROR,
							message: "fileSize must be greater than 0"
						});
						else if (e.uploadUrl) X.call(this, Y(Y({}, e), {
					orgName: u,
					appName: p,
					operateName: t
				}));
				else {
					var h = H.size || B;
					this.uploadPartEnable && c > 1.5 * h ? new J(this, {
						file: null === (n = null == e ? void 0 : e.file) || void 0 === n ?
							void 0 : n.data,
						onFileUploadProgress: e.onFileUploadProgress || Q,
						onFileUploadComplete: e.onFileUploadComplete || Q,
						onFileUploadError: e.onFileUploadError || Q,
						onFileUploadCanceled: e.onFileUploadCanceled || Q,
						onInitFail: function() {
							X.call(i, Y(Y({}, e), {
								orgName: u,
								appName: p,
								operateName: t
							}))
						},
						thumbnailInfo: {
							width: e.thumbnailWidth,
							height: e.thumbnailHeight
						}
					}) : X.call(this, Y(Y({}, e), {
						orgName: u,
						appName: p,
						operateName: t
					}))
				} else e.onFileUploadError && e.onFileUploadError({
					type: d.WEBIM_UPLOADFILE_ERROR,
					message: "AppKey illegal"
				});
				else e.onFileUploadError && e.onFileUploadError({
					type: d.WEBIM_UPLOADFILE_NO_LOGIN,
					message: "AccessToken cannot be empty"
				})
			}

			function ce(e, t) {
				e.onFileDownloadComplete = e.onFileDownloadComplete || Q, e.onFileDownloadError = e
					.onFileDownloadError || Q;
				var r = (new Date).getTime(),
					o = new XMLHttpRequest,
					n = this;
				o.addEventListener("load", (function(i) {
					var a = (new Date).getTime() - r;
					n.dataReport && t && t === E.DOWN_GROUP_FILE && n.dataReport
						.geOperateFun({
							operationName: t
						})({
							isEndApi: !0,
							data: {
								isSuccess: 200 === o.status ? 1 : 0,
								requestMethod: "POST",
								requestName: t,
								requestElapse: a,
								requestUrl: null == e ? void 0 : e.url,
								code: o.status,
								codeDesc: 200 === o.status ? "" : "download file error"
							}
						}), e.onFileDownloadComplete && e.onFileDownloadComplete(o.response)
				}), !1), o.addEventListener("error", (function(i) {
					var a = (new Date).getTime() - r;
					n.dataReport && t && t === E.DOWN_GROUP_FILE && n.dataReport
						.geOperateFun({
							operationName: t
						})({
							isEndApi: !0,
							data: {
								isSuccess: 0,
								requestMethod: "POST",
								requestName: t,
								requestElapse: a,
								requestUrl: null == e ? void 0 : e.url,
								code: (null == o ? void 0 : o.status) || 0,
								codeDesc: "download file error"
							}
						}), e.onFileDownloadError && e.onFileDownloadError({
							type: d.WEBIM_DOWNLOADFILE_ERROR,
							id: e.id,
							xhr: o
						})
				}), !1);
				var i = e.method || "GET",
					a = e.responseType || "blob",
					s = e.mimeType || "text/plain; charset=x-user-defined";
				o.open(i, e.url), "undefined" != typeof Blob ? o.responseType = a : o.overrideMimeType(
					s);
				var c = {
						"X-Requested-With": "XMLHttpRequest",
						Accept: "application/octet-stream",
						"share-secret": e.secret,
						Authorization: "Bearer " + this.context.accessToken
					},
					l = e.headers || {};
				for (var u in l) c[u] = l[u];
				for (var u in c) c[u] && o.setRequestHeader(u, c[u]);
				o.send(null)
			}

			function le(e) {
				void 0 === e && (e = {});
				var t = e.elapse,
					r = void 0 === t ? 0 : t,
					o = e.httpCode,
					n = void 0 === o ? 0 : o,
					i = e.errDesc;
				return {
					requestElapse: r,
					code: n,
					codeDesc: void 0 === i ? "" : i
				}
			}! function(e) {
				e.WEB = "web", e.WX = "wx", e.QQ = "qq", e.ZFB = "zfb", e.DD = "dd", e.TT = "tt", e
					.BAIDU = "baidu", e.QUICK_APP = "quick_app", e.UNI = "uni", e.NODE = "node"
			}(re || (re = {}));
			var ue = "localDeviceInfo",
				de = {
					autoIncrement: 0,
					ajaxUnconventionalErrorTimes: 0,
					ajax: $,
					getUniqueId: function() {
						this.autoIncrement ? this.autoIncrement++ : this.autoIncrement = 1;
						var e = new Date,
							t = new Date(2010, 1, 1);
						return (e.getTime() - t.getTime() + this.autoIncrement).toString()
					},
					getFileUrl: function(e) {
						var t = {
								url: "",
								filename: "",
								filetype: "",
								data: {}
							},
							r = "string" == typeof e ? document.getElementById(e) : e;
						if (window.URL.createObjectURL) {
							if (!r.files) throw Error("this is not HTMLInputElement");
							var o = r.files;
							if (o.length > 0) {
								var n = o.item(0);
								t.data = n, t.url = window.URL.createObjectURL(n), t.filename = (
									null == n ? void 0 : n.name) || ""
							}
						} else {
							if ("string" != typeof e) throw Error(
								"in IE fileInputId must be string");
							n = document.getElementById(e).value, t.url = n;
							var i = n.lastIndexOf("/"),
								a = n.lastIndexOf("\\"),
								s = Math.max(i, a);
							t.filename = s < 0 ? n : n.substring(s + 1)
						}
						var c = t.filename.lastIndexOf(".");
						return -1 !== c && (t.filetype = t.filename.substring(c + 1).toLowerCase()),
							t
					},
					uploadFile: se,
					flow: function(e) {
						for (var t = e.length, r = t; r--;)
							if ("function" != typeof e[r]) throw new TypeError(
								"Expected a function");
						return function() {
							for (var r = [], o = 0; o < arguments.length; o++) r[o] = arguments[
								o];
							for (var n = 0, i = t ? e[n].apply(this, r) : r[0]; ++n < t;) i = e[
								n].call(this, i);
							return i
						}
					},
					listenNetwork: oe,
					listenBrowserVisibility: ne,
					getEnvInfo: ie,
					wxRequest: ee,
					parseDownloadResponse: function(e) {
						if (!window || !window.URL) throw Error(
							"parseDownloadResponse can be used in broswer only");
						return e && e.type && "application/json" === e.type || 0 > Object.prototype
							.toString.call(e).indexOf("Blob") ? this.url + "?token=" : window.URL
							.createObjectURL(e)
					},
					download: ce,
					parseNotify: function(e) {
						for (var t = "", r = 0; r < e.length; r++) t += "%" + e[r].toString(16);
						return JSON.parse(decodeURIComponent(t))
					},
					getExtraData: le,
					formatAttachUrl: function(e) {
						return e && "string" == typeof e ? "".concat(this.apiUrl).concat(e.substr(e
							.indexOf("/", 9))) : ""
					},
					Uint8ArrayToString: function(e) {
						for (var t = "", r = 0; r < e.length; r++) t += String.fromCharCode(e[r]);
						return t
					},
					getLocalDeviceInfo: function() {
						var e, t = de.getEnvInfo(),
							r = t.platform,
							o = "";
						r !== re.NODE && r !== re.QUICK_APP || (o = "");
						try {
							r === re.WEB ? o = localStorage.getItem(ue) || "" : r === re.WX || r ===
								re.QQ || r === re.TT || r === re.BAIDU || r === re.UNI ? o = t
								.global.getStorageSync(ue) || "" : r !== re.ZFB && r !== re.DD || (
									o = (null === (e = t.global.getStorageSync({
										key: ue
									})) || void 0 === e ? void 0 : e.data) || "")
						} catch (e) {
							x.debug("get local deviceInfo failed: ", e)
						}
						return x.debug("local devInfo", o), o
					},
					setLocalDeviceInfo: function(e) {
						var t = de.getEnvInfo(),
							r = t.platform;
						r !== re.NODE && r !== re.QUICK_APP && (r === re.WEB ? localStorage.setItem(
							ue, e) : t.global.setStorage({
							key: ue,
							data: e,
							success: function(e) {
								x.debug("set local deviceInfo success: ", e)
							},
							fail: function(e) {
								x.debug("set local deviceInfo failed: ", e)
							}
						}))
					},
					detectBrowser: function() {
						if ("undefined" == typeof navigator) return "unknown";
						var e = navigator.userAgent;
						return /MicroMessenger/i.test(e) ? "WeChat" : /QQBrowser/i.test(e) ? "QQ" :
							!/Chrome/i.test(e) || /Edg/i.test(e) || /OPR/i.test(e) ? !/Safari/i
							.test(e) || /Chrome/i.test(e) || /CriOS/i.test(e) ? /Firefox/i.test(e) ?
							"Firefox" : /MSIE/i.test(e) || /Trident/i.test(e) ? "IE" : /Edg/i.test(
								e) ? "Edge" : "unknown" : "Safari" : "Chrome"
					},
					getDevicePlatform: function(e) {
						return e.platform === re.WX && "undefined" != typeof uni && ae(uni) ? re
							.UNI : e.platform
					}
				},
				pe = r(188),
				he = r.n(pe),
				fe = function() {
					return fe = Object.assign || function(e) {
						for (var t, r = 1, o = arguments.length; r < o; r++)
							for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t,
								n) && (e[n] = t[n]);
						return e
					}, fe.apply(this, arguments)
				},
				me = {
					chat: "singleChat",
					chatroom: "chatRoom",
					groupchat: "groupChat",
					singleChat: "singleChat",
					chatRoom: "chatRoom",
					groupChat: "groupChat"
				};

			function ge(e, t) {
				var r, o, n, i = t || {},
					a = i.formatCustomExts,
					s = void 0 === a || a,
					c = i.formatChatType,
					l = void 0 !== c && c,
					u = e.id,
					d = e.payload,
					p = e.timestamp,
					h = e.to,
					f = d.bodies && d.bodies.length > 0 ? d.bodies[0] : {},
					m = {},
					g = {},
					E = d.type ? d.type : h.indexOf("@conference.easemob.com") > -1 ? "groupChat" :
					"singleChat";
				E = "chat" === E ? "singleChat" : E, l && d.type && (E = me[d.type]);
				var y = "";
				switch (f.type) {
					case "txt":
						if (Object.prototype.hasOwnProperty.call(f, "subType") && "sub_combine" === f
							.subType) y = Be.call(this, {
							remotePath: null == f ? void 0 : f.url,
							secret: null == f ? void 0 : f.secret
						}), m = {
							id: u,
							type: "combine",
							chatType: E,
							to: d.to,
							from: d.from,
							ext: d.ext,
							time: p,
							title: f.title || "",
							summary: f.summary || "",
							url: y || "",
							secret: f.secret || "",
							file_length: f.file_length || 0,
							filename: f.filename || "",
							compatibleText: f.msg,
							combineLevel: f.combineLevel || 0
						};
						else {
							var v = null === (r = null == d ? void 0 : d.meta) || void 0 === r ?
								void 0 : r.edit_msg;
							if (m = {
									id: u,
									type: "txt",
									chatType: E,
									msg: f.msg || "",
									to: d.to || "",
									from: d.from,
									time: p,
									ext: d.ext
								}, v) {
								var _ = v.edit_time,
									T = v.operator,
									R = v.count;
								m.modifiedInfo = {
									operationTime: _,
									operatorId: T,
									operationCount: R
								}
							}
						}
						break;
					case "img":
						y = this.useOwnUploadFun ? null == f ? void 0 : f.url : Be.call(this, {
							remotePath: null == f ? void 0 : f.url,
							secret: null == f ? void 0 : f.secret
						}), m = {
							id: u,
							type: "img",
							chatType: E,
							to: d.to,
							from: d.from,
							time: p,
							ext: d.ext,
							width: (null === (o = f.size) || void 0 === o ? void 0 : o.width) || 0,
							height: (null === (n = f.size) || void 0 === n ? void 0 : n.height) ||
								0,
							thumb: this.useOwnUploadFun ? "" : "".concat(y, "&thumbnail=true"),
							thumb_secret: f.secret,
							secret: f.secret || "",
							url: y || "",
							file_length: f.file_length || 0,
							file: {}
						};
						break;
					case "video":
						y = this.useOwnUploadFun ? null == f ? void 0 : f.url : Be.call(this, {
							remotePath: null == f ? void 0 : f.url,
							secret: null == f ? void 0 : f.secret
						}), m = {
							id: u,
							type: "video",
							chatType: E,
							from: d.from,
							to: d.to,
							thumb: de.formatAttachUrl.call(this, f.thumb),
							thumb_secret: f.thumb_secret || "",
							url: y || "",
							secret: f.secret || "",
							filename: f.filename,
							length: f.length || 0,
							file: {},
							file_length: f.file_length || 0,
							filetype: d.ext.file_type || "",
							ext: d.ext,
							time: p
						};
						break;
					case "loc":
						m = {
							id: u,
							type: "loc",
							chatType: E,
							from: d.from,
							to: d.to,
							buildingName: f.buildingName || "",
							addr: f.addr,
							lat: f.lat,
							lng: f.lng,
							ext: d.ext,
							time: p
						};
						break;
					case "audio":
						y = this.useOwnUploadFun ? null == f ? void 0 : f.url : Be.call(this, {
							remotePath: null == f ? void 0 : f.url,
							secret: null == f ? void 0 : f.secret
						}), m = {
							id: u,
							type: "audio",
							chatType: E,
							from: d.from,
							to: d.to,
							secret: f.secret || "",
							ext: d.ext,
							time: p,
							url: y || "",
							file: {},
							filename: f.filename,
							length: f.length || 0,
							file_length: f.file_length || 0,
							filetype: d.ext.file_type || ""
						};
						break;
					case "file":
						y = this.useOwnUploadFun ? null == f ? void 0 : f.url : Be.call(this, {
							remotePath: null == f ? void 0 : f.url,
							secret: null == f ? void 0 : f.secret
						}), m = {
							id: u,
							type: "file",
							chatType: E,
							from: d.from,
							to: d.to,
							ext: d.ext,
							time: p,
							url: y || "",
							secret: f.secret || "",
							file: {},
							filename: f.filename || "",
							file_length: f.file_length || 0,
							filetype: d.ext.file_type || ""
						};
						break;
					case "cmd":
						m = {
							id: u,
							type: "cmd",
							chatType: E,
							from: d.from,
							to: d.to,
							ext: d.ext,
							time: p,
							action: f.action || ""
						};
						break;
					case "custom":
						var O = f.customExts || {};
						s && f.customExts && (O = {}, f.customExts.map((function(e) {
							O = fe(fe({}, O), e)
						}))), m = {
							id: u,
							type: "custom",
							chatType: E,
							from: d.from,
							to: d.to,
							ext: d.ext,
							time: p,
							customEvent: f.customEvent || "",
							customExts: O
						};
						break;
					case "combine":
						y = Be.call(this, {
							remotePath: null == f ? void 0 : f.url,
							secret: null == f ? void 0 : f.secret
						}), m = {
							id: u,
							type: "combine",
							chatType: E,
							msg: f.msg || "",
							to: d.to || "",
							from: d.from,
							time: p,
							ext: d.ext,
							title: f.title || "",
							summary: f.summary || "",
							url: y || "",
							compatibleText: f.text,
							combineLevel: f.combineLevel || 0,
							secret: f.secret || "",
							filename: f.filename || "",
							file_length: f.file_length || 0
						};
						break;
					default:
						x.error("unexpected message: ".concat(e))
				}
				if (d.msgConfig && (g.msgConfig = d.msgConfig), null == d ? void 0 : d.meta) {
					var I = d.meta;
					I.thread && (g.chatThread = {
						messageId: I.thread.msg_parent_id,
						parentId: I.thread.muc_parent_id,
						chatThreadName: I.thread.thread_name
					}), I.reaction && (g.reactions = I.reaction), I.translations && (g
						.translations = I.translations)
				}
				return fe(fe({}, m), g)
			}
			var Ee, ye = function(e) {
					return "".concat(e.conversationType, "-").concat(e.conversationId)
				},
				ve = function(e) {
					var t = e.isRecallSelfMsg,
						r = e.conversation,
						o = e.recalledMsgTime,
						n = r.unReadCount,
						i = void 0 === n ? 0 : n,
						a = r.unreadCountClearTimestamp;
					return t || (void 0 === a ? 0 : a) > o ? i : i && i > 0 ? i - 1 : 0
				},
				_e = function(e) {
					var t, r = 0;
					if (0 === e.length) return r;
					for (t = 0; t < e.length; t++) r = (r << 5) - r + e.charCodeAt(t), r |= 0;
					return r
				},
				Te = function() {
					function e(e) {
						var t = e.id;
						this.id = t, this.type = e.type
					}
					return e.prototype.set = function(e) {
						this.body = {
							id: this.id,
							ackId: e.id,
							type: "read",
							to: e.to,
							from: e.from || "",
							chatType: e.chatType
						}
					}, e.create = function(e) {
						return {
							id: de.getUniqueId(),
							chatType: e.chatType,
							ackId: e.id,
							type: "read",
							to: e.to,
							from: e.from || "",
							ackContent: e.ackContent,
							isChatThread: e.isChatThread,
							priority: e.priority,
							deliverOnlineOnly: e.deliverOnlineOnly
						}
					}, e
				}(),
				Re = function() {
					function e(e) {
						this.id = e.id, this.type = e.type
					}
					return e.prototype.set = function(e) {
						this.body = {
							id: this.id,
							ackId: e.ackId,
							type: "delivery",
							to: e.to,
							from: e.from || ""
						}
					}, e.create = function(e) {
						return {
							id: de.getUniqueId(),
							ackId: e.ackId,
							type: "delivery",
							to: e.to,
							from: e.from || "",
							isChatThread: e.isChatThread,
							priority: e.priority,
							deliverOnlineOnly: e.deliverOnlineOnly
						}
					}, e
				}(),
				Oe = function() {
					function e(e) {
						var t = e.type,
							r = e.id;
						this.id = r, this.type = t
					}
					return e.prototype.set = function(e) {
						this.body = {
							id: this.id,
							chatType: e.chatType || "singleChat",
							type: "channel",
							to: e.to,
							from: e.from || "",
							time: Date.now()
						}
					}, e.prototype.setChatType = function(e) {
						return !!this.body && (this.body.chatType = e, !0)
					}, e.prototype.setGroup = function(e) {
						return !!this.body && (this.body.group = e, !0)
					}, e.create = function(e) {
						return {
							id: de.getUniqueId(),
							type: "channel",
							chatType: e.chatType || "singleChat",
							to: e.to,
							from: e.from || "",
							time: Date.now(),
							isChatThread: e.isChatThread,
							priority: e.priority,
							deliverOnlineOnly: e.deliverOnlineOnly
						}
					}, e
				}(),
				Ie = function() {
					function e(e) {
						var t = e.type,
							r = e.id || de.getUniqueId();
						this.id = r, this.type = t, this.value = ""
					}
					return e.prototype.set = function(e) {
						this.body = {
							id: this.id,
							chatType: e.chatType || "singleChat",
							type: "txt",
							to: e.to,
							msg: e.msg,
							from: e.from,
							roomType: e.roomType,
							success: e.success,
							fail: e.fail,
							ext: e.ext,
							time: Date.now(),
							isChatThread: e.isChatThread
						}, this.value = e.msg
					}, e.prototype.setChatType = function(e) {
						return !!this.body && (this.body.chatType = e, !0)
					}, e.prototype.setGroup = function(e) {
						return !!this.body && (this.body.group = e, !0)
					}, e.create = function(e) {
						var t, r;
						return (null === (t = e.msgConfig) || void 0 === t ? void 0 : t
							.languages) && Array.isArray(null === (r = e.msgConfig) || void 0 ===
								r ? void 0 : r.languages), {
								type: "txt",
								id: de.getUniqueId(),
								msg: e.msg,
								to: e.to,
								from: e.from || "",
								chatType: e.chatType,
								ext: e.ext,
								time: Date.now(),
								msgConfig: e.msgConfig,
								isChatThread: e.isChatThread,
								priority: e.priority,
								deliverOnlineOnly: e.deliverOnlineOnly,
								receiverList: e.receiverList
							}
					}, e
				}(),
				Se = function() {
					function e(e) {
						var t = e.type,
							r = e.id;
						this.id = r || de.getUniqueId(), this.type = t
					}
					return e.prototype.set = function(e) {
						this.body = {
							id: this.id,
							chatType: e.chatType || "singleChat",
							type: "cmd",
							to: e.to,
							action: e.action,
							from: e.from,
							roomType: e.roomType,
							success: e.success,
							fail: e.fail,
							ext: e.ext,
							time: Date.now()
						}
					}, e.prototype.setChatType = function(e) {
						return !!this.body && (this.body.chatType = e, !0)
					}, e.prototype.setGroup = function(e) {
						return !!this.body && (this.body.group = e, !0)
					}, e.create = function(e) {
						return {
							id: de.getUniqueId(),
							type: "cmd",
							to: e.to,
							from: e.from || "",
							chatType: e.chatType || "singleChat",
							action: e.action,
							time: Date.now(),
							ext: e.ext,
							msgConfig: e.msgConfig,
							isChatThread: e.isChatThread,
							priority: e.priority,
							deliverOnlineOnly: e.deliverOnlineOnly,
							receiverList: e.receiverList
						}
					}, e
				}(),
				Ce = function() {
					function e(e) {
						var t = e.type,
							r = e.id || de.getUniqueId();
						this.id = r, this.type = t
					}
					return e.prototype.set = function(e) {
						this.body = {
							id: this.id,
							chatType: e.chatType || "singleChat",
							type: "custom",
							to: e.to,
							customEvent: e.customEvent,
							customExts: e.customExts,
							from: e.from,
							roomType: e.roomType,
							success: e.success,
							fail: e.fail,
							ext: e.ext,
							time: Date.now()
						}
					}, e.prototype.setChatType = function(e) {
						return !!this.body && (this.body.chatType = e, !0)
					}, e.prototype.setGroup = function(e) {
						return !!this.body && (this.body.group = e, !0)
					}, e.create = function(e) {
						return {
							id: de.getUniqueId(),
							chatType: e.chatType || "singleChat",
							type: "custom",
							to: e.to,
							customEvent: e.customEvent,
							customExts: e.customExts,
							from: e.from || "",
							ext: e.ext,
							time: Date.now(),
							msgConfig: e.msgConfig,
							isChatThread: e.isChatThread,
							priority: e.priority,
							deliverOnlineOnly: e.deliverOnlineOnly,
							receiverList: e.receiverList
						}
					}, e
				}(),
				Ae = function() {
					function e(e) {
						var t = e.type,
							r = e.id;
						this.id = r || de.getUniqueId(), this.type = t
					}
					return e.prototype.set = function(e) {
						this.body = {
							id: this.id,
							chatType: e.chatType || "singleChat",
							type: "loc",
							to: e.to,
							addr: e.addr,
							buildingName: e.buildingName,
							lat: e.lat,
							lng: e.lng,
							from: e.from,
							roomType: e.roomType,
							success: e.success,
							fail: e.fail,
							ext: e.ext,
							time: Date.now()
						}
					}, e.prototype.setChatType = function(e) {
						return !!this.body && (this.body.chatType = e, !0)
					}, e.prototype.setGroup = function(e) {
						return !!this.body && (this.body.group = e, !0)
					}, e.create = function(e) {
						return {
							id: de.getUniqueId(),
							chatType: e.chatType || "singleChat",
							type: "loc",
							to: e.to,
							addr: e.addr,
							buildingName: e.buildingName,
							lat: e.lat,
							lng: e.lng,
							from: e.from || "",
							ext: e.ext,
							time: Date.now(),
							msgConfig: e.msgConfig,
							isChatThread: e.isChatThread,
							priority: e.priority,
							deliverOnlineOnly: e.deliverOnlineOnly,
							receiverList: e.receiverList
						}
					}, e
				}(),
				Ne = function() {
					function e(e) {
						var t = e.type,
							r = e.id || de.getUniqueId();
						this.id = r, this.type = t
					}
					return e.prototype.set = function(e) {
						e.file = e.file || e.fileInputId && de.getFileUrl(e.fileInputId), this
							.body = {
								id: this.id,
								chatType: e.chatType || "singleChat",
								type: "img",
								file: e.file,
								width: e.width,
								height: e.height,
								to: e.to,
								from: e.from || "",
								roomType: e.roomType,
								success: e.success,
								fail: e.fail,
								ext: e.ext,
								time: Date.now(),
								onFileUploadError: e.onFileUploadError,
								onFileUploadComplete: e.onFileUploadComplete,
								onFileUploadProgress: e.onFileUploadProgress,
								body: e.body,
								isChatThread: e.isChatThread
							}
					}, e.prototype.setChatType = function(e) {
						return !!this.body && (this.body.chatType = e, !0)
					}, e.prototype.setGroup = function(e) {
						return !!this.body && (this.body.group = e, !0)
					}, e.create = function(e) {
						return {
							id: de.getUniqueId(),
							chatType: e.chatType,
							type: "img",
							url: e.url,
							width: e.width,
							height: e.height,
							file: e.file,
							to: e.to,
							from: e.from || "",
							ext: e.ext,
							time: Date.now(),
							msgConfig: e.msgConfig,
							file_length: e.file_length,
							onFileUploadError: e.onFileUploadError,
							onFileUploadComplete: e.onFileUploadComplete,
							onFileUploadProgress: e.onFileUploadProgress,
							isChatThread: e.isChatThread,
							priority: e.priority,
							deliverOnlineOnly: e.deliverOnlineOnly,
							receiverList: e.receiverList,
							thumbnailWidth: e.thumbnailWidth,
							thumbnailHeight: e.thumbnailHeight
						}
					}, e
				}(),
				Me = function() {
					function e(e) {
						var t = e.type,
							r = e.id || de.getUniqueId();
						this.id = r, this.type = t
					}
					return e.prototype.set = function(e) {
						e.file = e.file || e.fileInputId && de.getFileUrl(e.fileInputId), this
							.body = {
								id: this.id,
								chatType: e.chatType || "singleChat",
								type: "audio",
								file: e.file,
								filename: e.filename,
								length: e.length,
								file_length: e.file_length,
								fileInputId: e.fileInputId,
								to: e.to,
								from: e.from,
								roomType: e.roomType,
								success: e.success,
								fail: e.fail,
								ext: e.ext,
								time: Date.now(),
								onFileUploadError: e.onFileUploadError,
								onFileUploadComplete: e.onFileUploadComplete,
								onFileUploadProgress: e.onFileUploadProgress,
								body: e.body,
								isChatThread: e.isChatThread
							}
					}, e.prototype.setChatType = function(e) {
						return !!this.body && (this.body.chatType = e, !0)
					}, e.prototype.setGroup = function(e) {
						return !!this.body && (this.body.group = e, !0)
					}, e.create = function(e) {
						return {
							id: de.getUniqueId(),
							chatType: e.chatType,
							type: "audio",
							filename: e.filename,
							length: e.length,
							file: e.file,
							to: e.to,
							from: e.from || "",
							ext: e.ext,
							time: Date.now(),
							onFileUploadError: e.onFileUploadError,
							onFileUploadComplete: e.onFileUploadComplete,
							onFileUploadProgress: e.onFileUploadProgress,
							body: e.body,
							file_length: e.file_length,
							msgConfig: e.msgConfig,
							isChatThread: e.isChatThread,
							priority: e.priority,
							deliverOnlineOnly: e.deliverOnlineOnly,
							receiverList: e.receiverList
						}
					}, e
				}(),
				be = function() {
					function e(e) {
						var t = e.type,
							r = e.id;
						this.id = r, this.type = t
					}
					return e.prototype.set = function(e) {
						e.file = e.file || e.fileInputId && de.getFileUrl(e.fileInputId), this
							.body = {
								id: this.id,
								chatType: e.chatType || "singleChat",
								type: "video",
								file: e.file,
								filename: e.filename,
								length: e.length,
								file_length: e.file_length,
								fileInputId: e.fileInputId,
								to: e.to,
								from: e.from,
								roomType: e.roomType,
								success: e.success,
								fail: e.fail,
								ext: e.ext,
								time: Date.now(),
								apiUrl: e.apiUrl,
								onFileUploadError: e.onFileUploadError,
								onFileUploadComplete: e.onFileUploadComplete,
								onFileUploadProgress: e.onFileUploadProgress,
								body: e.body,
								isChatThread: e.isChatThread
							}
					}, e.prototype.setChatType = function(e) {
						return !!this.body && (this.body.chatType = e, !0)
					}, e.prototype.setGroup = function(e) {
						return !!this.body && (this.body.group = e, !0)
					}, e.create = function(e) {
						return {
							id: de.getUniqueId(),
							chatType: e.chatType || "singleChat",
							type: "video",
							file: e.file,
							filename: e.filename,
							length: e.length,
							file_length: e.file_length,
							fileInputId: e.fileInputId,
							to: e.to,
							from: e.from || "",
							ext: e.ext,
							time: Date.now(),
							onFileUploadError: e.onFileUploadError,
							onFileUploadComplete: e.onFileUploadComplete,
							onFileUploadProgress: e.onFileUploadProgress,
							body: e.body,
							msgConfig: e.msgConfig,
							isChatThread: e.isChatThread,
							priority: e.priority,
							deliverOnlineOnly: e.deliverOnlineOnly,
							receiverList: e.receiverList
						}
					}, e
				}(),
				Ue = function() {
					function e(e) {
						var t = e.type,
							r = e.id;
						this.id = r, this.type = t
					}
					return e.prototype.set = function(e) {
						e.file = e.file || e.fileInputId && de.getFileUrl(e.fileInputId), this
							.body = {
								id: this.id,
								chatType: e.chatType || "singleChat",
								type: "file",
								file: e.file,
								filename: e.filename,
								fileInputId: e.fileInputId,
								to: e.to,
								from: e.from,
								roomType: e.roomType,
								success: e.success,
								fail: e.fail,
								ext: e.ext,
								time: Date.now(),
								onFileUploadError: e.onFileUploadError,
								onFileUploadComplete: e.onFileUploadComplete,
								onFileUploadProgress: e.onFileUploadProgress,
								body: e.body,
								isChatThread: e.isChatThread
							}
					}, e.prototype.setChatType = function(e) {
						return !!this.body && (this.body.chatType = e, !0)
					}, e.prototype.setGroup = function(e) {
						return !!this.body && (this.body.group = e, !0)
					}, e.create = function(e) {
						return {
							id: de.getUniqueId(),
							chatType: e.chatType || "singleChat",
							type: "file",
							file: e.file,
							filename: e.filename,
							fileInputId: e.fileInputId,
							file_length: e.file_length,
							to: e.to,
							from: e.from || "",
							ext: e.ext,
							onFileUploadError: e.onFileUploadError,
							onFileUploadComplete: e.onFileUploadComplete,
							onFileUploadProgress: e.onFileUploadProgress,
							body: e.body,
							time: Date.now(),
							msgConfig: e.msgConfig,
							isChatThread: e.isChatThread,
							priority: e.priority,
							deliverOnlineOnly: e.deliverOnlineOnly,
							receiverList: e.receiverList
						}
					}, e
				}(),
				Pe = function() {
					function e(e) {
						var t = e.type,
							r = e.id || de.getUniqueId();
						this.id = r, this.type = t, this.value = ""
					}
					return e.create = function(e) {
						return {
							type: "combine",
							id: de.getUniqueId(),
							to: e.to,
							from: e.from || "",
							chatType: e.chatType,
							ext: e.ext,
							time: Date.now(),
							msgConfig: e.msgConfig,
							isChatThread: e.isChatThread,
							priority: e.priority,
							deliverOnlineOnly: e.deliverOnlineOnly,
							receiverList: e.receiverList,
							compatibleText: e.compatibleText,
							title: e.title,
							summary: e.summary,
							messageList: e.messageList,
							onFileUploadError: e.onFileUploadError,
							onFileUploadComplete: e.onFileUploadComplete
						}
					}, e
				}(),
				ke = function() {
					function e(t, r) {
						return this.type = t, this.id = r || de.getUniqueId(), e.createOldMsg({
							type: t,
							id: this.id
						})
					}
					return e.createOldMsg = function(e) {
						switch (e.type) {
							case "read":
								return new Te({
									type: "read",
									id: e.id
								});
							case "delivery":
								return new Re({
									type: "delivery",
									id: e.id
								});
							case "channel":
								return new Oe({
									type: "channel",
									id: e.id
								});
							case "txt":
								return new Ie({
									type: "txt",
									id: e.id
								});
							case "cmd":
								return new Se({
									type: "cmd",
									id: e.id
								});
							case "custom":
								return new Ce({
									type: "custom",
									id: e.id
								});
							case "loc":
								return new Ae({
									type: "loc",
									id: e.id
								});
							case "img":
								return new Ne({
									type: "img",
									id: e.id
								});
							case "audio":
								return new Me({
									type: "audio",
									id: e.id
								});
							case "video":
								return new be({
									type: "video",
									id: e.id
								});
							case "file":
								return new Ue({
									type: "file",
									id: e.id
								})
						}
					}, e.create = function(e) {
						return "txt" !== (t = e).type || "version" in t ? function(e) {
							return "img" === e.type && !("version" in e)
						}(e) ? Ne.create(e) : function(e) {
							return "cmd" === e.type && !("version" in e)
						}(e) ? Se.create(e) : function(e) {
							return "file" === e.type && !("version" in e)
						}(e) ? Ue.create(e) : function(e) {
							return "audio" === e.type && !("version" in e)
						}(e) ? Me.create(e) : function(e) {
							return "video" === e.type && !("version" in e)
						}(e) ? be.create(e) : function(e) {
							return "custom" === e.type && !("version" in e)
						}(e) ? Ce.create(e) : function(e) {
							return "loc" === e.type && !("version" in e)
						}(e) ? Ae.create(e) : function(e) {
							return "channel" === e.type && !("version" in e)
						}(e) ? Oe.create(e) : function(e) {
							return "delivery" === e.type && !("version" in e)
						}(e) ? Re.create(e) : function(e) {
							return "read" === e.type && !("version" in e)
						}(e) ? Te.create(e) : function(e) {
							return "combine" === e.type && !("version" in e)
						}(e) ? Pe.create(e) : {} : Ie.create(e);
						var t
					}, e.prototype.set = function(e) {}, e
				}();
			! function(e) {
				e[e.CREATE = 0] = "CREATE", e[e.FAIL = 1] = "FAIL", e[e.INPROGRESS = 2] = "INPROGRESS",
					e[e.SUCCESS = 3] = "SUCCESS"
			}(Ee || (Ee = {}));
			var we = function() {
					return we = Object.assign || function(e) {
						for (var t, r = 1, o = arguments.length; r < o; r++)
							for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t,
								n) && (e[n] = t[n]);
						return e
					}, we.apply(this, arguments)
				},
				Le = function(e, t, r, o) {
					return new(r || (r = Promise))((function(n, i) {
						function a(e) {
							try {
								c(o.next(e))
							} catch (e) {
								i(e)
							}
						}

						function s(e) {
							try {
								c(o.throw(e))
							} catch (e) {
								i(e)
							}
						}

						function c(e) {
							var t;
							e.done ? n(e.value) : (t = e.value, t instanceof r ? t : new r((
								function(e) {
									e(t)
								}))).then(a, s)
						}
						c((o = o.apply(e, t || [])).next())
					}))
				},
				De = function(e, t) {
					var r, o, n, i, a = {
						label: 0,
						sent: function() {
							if (1 & n[0]) throw n[1];
							return n[1]
						},
						trys: [],
						ops: []
					};
					return i = {
						next: s(0),
						throw: s(1),
						return: s(2)
					}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
						return this
					}), i;

					function s(i) {
						return function(s) {
							return function(i) {
								if (r) throw new TypeError("Generator is already executing.");
								for (; a;) try {
									if (r = 1, o && (n = 2 & i[0] ? o.return : i[0] ? o
											.throw || ((n = o.return) && n.call(o), 0) : o
											.next) && !(n = n.call(o, i[1])).done) return n;
									switch (o = 0, n && (i = [2 & i[0], n.value]), i[0]) {
										case 0:
										case 1:
											n = i;
											break;
										case 4:
											return a.label++, {
												value: i[1],
												done: !1
											};
										case 5:
											a.label++, o = i[1], i = [0];
											continue;
										case 7:
											i = a.ops.pop(), a.trys.pop();
											continue;
										default:
											if (!((n = (n = a.trys).length > 0 && n[n
														.length - 1]) || 6 !== i[0] && 2 !==
													i[0])) {
												a = 0;
												continue
											}
											if (3 === i[0] && (!n || i[1] > n[0] && i[1] <
													n[3])) {
												a.label = i[1];
												break
											}
											if (6 === i[0] && a.label < n[1]) {
												a.label = n[1], n = i;
												break
											}
											if (n && a.label < n[2]) {
												a.label = n[2], a.ops.push(i);
												break
											}
											n[2] && a.ops.pop(), a.trys.pop();
											continue
									}
									i = t.call(e, a)
								} catch (e) {
									i = [6, e], o = 0
								} finally {
									r = n = 0
								}
								if (5 & i[0]) throw i[1];
								return {
									value: i[0] ? i[1] : void 0,
									done: !0
								}
							}([i, s])
						}
					}
				},
				xe = {
					0: "TEXT",
					1: "IMAGE",
					2: "VIDEO",
					3: "LOCATION",
					4: "VOICE",
					5: "FILE",
					6: "COMMAND",
					7: "CUSTOM",
					8: "COMBINE"
				};

			function Ge(e) {
				for (var t = {}, r = 0; r < e.length; r++)
					if (8 === e[r].type) t[e[r].key] = JSON.parse(e[r].stringValue);
					else if (7 === e[r].type) t[e[r].key] = e[r].stringValue;
				else if (6 === e[r].type) t[e[r].key] = e[r].doubleValue;
				else if (5 === e[r].type) t[e[r].key] = e[r].floatValue;
				else if (1 === e[r].type) {
					var o = e[r].varintValue,
						n = new(f())(o.low, o.high, o.unsigned).toString();
					t[e[r].key] = 0 !== Number(n)
				} else 2 !== e[r].type && 3 !== e[r].type && 4 !== e[r].type || (o = e[r].varintValue,
					n = new(f())(o.low, o.high, o.unsigned).toString(), t[e[r].key] = Number(n));
				return t
			}

			function Be(e) {
				var t = "";
				return e.remotePath && (t = de.formatAttachUrl.call(this, e.remotePath), e.remotePath
					.includes("?em-redirect") || (t = "".concat(t, "?em-redirect=true"), e
						.secretKey && (t = "".concat(t, "&share-secret=").concat(e.secretKey)))), t
			}

			function He(e, t) {
				var r, o, n = t.from && t.from.name;
				if (n === this.context.userId) {
					var i = null === (r = null == e ? void 0 : e.from) || void 0 === r ? void 0 : r
						.clientResource;
					n === (null === (o = null == t ? void 0 : t.to) || void 0 === o ? void 0 : o
						.name) && i && i !== this.clientResource && (n = "".concat(n, "/").concat(i))
				}
				return n
			}

			function je(e, t) {
				var r, o = t.to && t.to.name;
				return (null === (r = null == e ? void 0 : e.to) || void 0 === r ? void 0 : r
					.clientResource) && (o = "".concat(o, "/").concat(e.to.clientResource)), o
			}

			function Fe(e) {
				var t, r, o, n, i, a, s, c, l, u, d, p, h, f, m, g, E, y, v, _, T, R, O, I, S, C, A;
				return Le(this, void 0, void 0, (function() {
					var N, M, b, U, P, k, w, L, D, G, B, H, j, F, W, K, q, z, V, J, X, Y, Q,
						$, Z, ee, te, re, oe, ne, ie, ae, se, ce, le, ue, pe, he, fe, me,
						ye, ve, _e, Te, Re, Oe, Ie, Se, Ce, Ae, Ne, Me;
					return De(this, (function(be) {
						switch (be.label) {
							case 0:
								switch (N = e.status, M = e.thirdMessage, b = e
									.msgBody, U = e.msgId, P = e.type, k = e
									.from, w = e.to, L = e.time, D = e
									.onlineState, G = e.chatType, B = e
									.ignoreCallback, H = e.priority, j = e
									.format, F = e.broadcast, W = void 0 !==
									F && F, K = e.isContentReplaced, q =
									void 0 !== K && K, z = {}, V = {}, J = N
									.errorCode > 0, X = N.errorCode, Y = N
									.reason, Q = {}, $ = [], Z = [], ee = {},
									te = "", re = 0, oe = null, ne = null, M
									.ext && (Q = Ge(M.ext)), M.meta &&
									"string" == typeof M.meta && ((ae = JSON
											.parse(M.meta)).reaction && ($ = ae
											.reaction).forEach((function(e) {
											e.isAddedBySelf = e.state,
												delete e.state
										})), ae.translations && (Z = ae
											.translations), ae.edit_msg && (se =
											ae.edit_msg, ce = se.count, le = se
											.operator, ue = se.edit_time, pe =
											se.sender, he = se.send_time, ee = {
												operationTime: ue,
												operatorId: le,
												operationCount: ce
											}, te = pe, re = he), ae.thread &&
										"{}" !== JSON.stringify(ae.thread) && (
											oe = {
												messageId: ae.thread
													.msg_parent_id,
												parentId: ae.thread
													.muc_parent_id,
												chatThreadName: ae.thread
													.thread_name
											}), ae.thread_overview && "{}" !==
										JSON.stringify(ae.thread_overview) && (
											ne = {
												id: ae.thread_overview.id,
												parentId: ae.thread_overview
													.muc_parent_id,
												name: ae.thread_overview.name,
												lastMessage: ae.thread_overview
													.last_message && "{}" !==
													JSON.stringify(ae
														.thread_overview
														.last_message) ? ge
													.call(this, ae
														.thread_overview
														.last_message) : null,
												createTimestamp: ae
													.thread_overview
													.create_timestamp,
												updateTimestamp: ae
													.thread_overview
													.update_timestamp,
												messageCount: ae.thread_overview
													.message_count || 0
											})), b.type) {
									case 0:
										return [3, 1];
									case 1:
										return [3, 7];
									case 2:
										return [3, 10];
									case 3:
										return [3, 13];
									case 4:
										return [3, 16];
									case 5:
										return [3, 19];
									case 6:
										return [3, 22];
									case 7:
										return [3, 23];
									case 8:
										return [3, 26]
								}
								return [3, 27];
							case 1:
								return Object.prototype.hasOwnProperty.call(b,
									"subType") && 0 === b.subType ? (ie = Be
									.call(this, b), fe = {
										id: U,
										type: "combine",
										chatType: G,
										to: w,
										from: k,
										ext: Q,
										time: Number(L),
										onlineState: D,
										title: b.title || "",
										summary: b.summary || "",
										url: ie || "",
										secret: b.secretKey || "",
										file_length: b.fileLength || 0,
										filename: b.displayName || "",
										compatibleText: b.text,
										combineLevel: b.combineLevel || 0
									}, z.msgConfig && (fe.msgConfig = z
										.msgConfig), $.length > 0 && (fe
										.reactions = $), oe && (fe
										.chatThread = oe), ne && (fe
										.chatThreadOverview = ne),
									"chatRoom" === G && (fe.priority = H, fe
										.broadcast = W), q && (fe
										.isContentReplaced = q), V = fe, B ?
									[3, 3] : [4, null === (r = null === (t =
												this._localCache) ||
											void 0 === t ? void 0 : t
											.getInstance()) || void 0 ===
										r ? void 0 : r.storeMessage(fe, Ee
											.SUCCESS)
									]) : [3, 4];
							case 2:
								be.sent(), null === (o = this.eventHandler) ||
									void 0 === o || o.dispatch(
										"onCombineMessage", fe), be.label = 3;
							case 3:
								return [3, 28];
							case 4:
								return !(z = {
										id: U,
										type: P,
										contentsType: xe[b.type],
										from: k,
										to: w,
										data: b.text,
										ext: Q,
										sourceMsg: b.text,
										time: L,
										msgConfig: M.msgConfig,
										onlineState: D
									}).msgConfig && delete M.msgConfig, z
									.error = J, z.errorText = Y, z.errorCode =
									X, !B && this.onTextMessage && this
									.onTextMessage(z), me = {
										id: U,
										type: "txt",
										chatType: G,
										msg: b.text,
										to: w,
										from: k,
										ext: Q,
										time: Number(L),
										onlineState: D
									}, z.msgConfig && (me.msgConfig = z
										.msgConfig), $.length > 0 && (me
										.reactions = $), oe && (me.chatThread =
										oe), ne && (me.chatThreadOverview = ne),
									Z.length > 0 && (me.translations = Z), ee
									.operationCount > 0 && (me.modifiedInfo =
										ee, M.type === nt.EDIT && (me.from = te,
											me.time = re)), "chatRoom" === G &&
									(me.priority = H, me.broadcast = W), q && (
										me.isContentReplaced = q), V = me, B ? [
										3, 6
									] : [4, null === (i = null === (n = this
												._localCache) || void 0 === n ?
											void 0 : n.getInstance()) ||
										void 0 === i ? void 0 : i.storeMessage(
											me, Ee.SUCCESS)
									];
							case 5:
								be.sent(), null === (a = this.eventHandler) ||
									void 0 === a || a.dispatch("onTextMessage",
										me), be.label = 6;
							case 6:
								return [3, 28];
							case 7:
								return ye = (null === (s = null == b ? void 0 :
											b.size) || void 0 === s ? void 0 : s
										.width) || 0, ve = (null === (c =
											null == b ? void 0 : b.size) ||
										void 0 === c ? void 0 : c.height) || 0,
									ie = this.useOwnUploadFun ? b.remotePath :
									Be.call(this, b), !(z = {
										id: U,
										type: P,
										contentsType: xe[b.type],
										from: k,
										to: w,
										url: ie,
										secret: b.secretKey,
										filename: b.displayName,
										thumb: this.useOwnUploadFun ? "" :
											"".concat(ie,
											"&thumbnail=true"),
										thumb_secret: b.secretKey,
										file_length: b.fileLength || "",
										width: ye,
										height: ve,
										filetype: b.filetype || "",
										accessToken: this.token,
										ext: Q,
										time: L,
										msgConfig: M.msgConfig,
										onlineState: D
									}).delay && delete z.delay, !z.msgConfig &&
									delete M.msgConfig, z.error = J, z
									.errorText = Y, z.errorCode = X, !B && this
									.onPictureMessage && this.onPictureMessage(
										z), _e = {
										id: U,
										type: "img",
										chatType: G,
										from: k,
										to: w,
										url: ie || "",
										width: ye,
										height: ve,
										secret: b.secretKey || "",
										thumb: this.useOwnUploadFun ? "" : ""
											.concat(ie, "&thumbnail=true"),
										thumb_secret: b.secretKey,
										file_length: b.fileLength || 0,
										ext: Q,
										time: Number(L),
										onlineState: D
									}, z.msgConfig && (_e.msgConfig = z
										.msgConfig), $.length > 0 && (_e
										.reactions = $), oe && (_e.chatThread =
										oe), ne && (_e.chatThreadOverview = ne),
									"chatRoom" === G && (_e.priority = H, _e
										.broadcast = W), q && (_e
										.isContentReplaced = q), V = _e, B ? [3,
										9
									] : [4, null === (u = null === (l = this
												._localCache) || void 0 === l ?
											void 0 : l.getInstance()) ||
										void 0 === u ? void 0 : u.storeMessage(
											_e, Ee.SUCCESS)
									];
							case 8:
								be.sent(), null === (d = this.eventHandler) ||
									void 0 === d || d.dispatch("onImageMessage",
										_e), be.label = 9;
							case 9:
								return [3, 28];
							case 10:
								return ie = this.useOwnUploadFun ? b
									.remotePath : Be.call(this, b), !(z = {
										id: U,
										type: P,
										contentsType: xe[b.type],
										from: k,
										to: w,
										url: ie,
										secret: b.secretKey,
										filename: b.displayName,
										length: b.duration || "",
										file_length: b.fileLength || "",
										filetype: b.filetype || "",
										accessToken: this.token || "",
										ext: Q,
										time: L,
										msgConfig: M.msgConfig,
										onlineState: D
									}).delay && delete z.delay, !z.msgConfig &&
									delete M.msgConfig, z.error = J, z
									.errorText = Y, z.errorCode = X, !B && this
									.onVideoMessage && this.onVideoMessage(z),
									Te = {
										id: U,
										type: "video",
										chatType: G,
										from: k,
										to: w,
										url: ie,
										secret: b.secretKey,
										thumb: de.formatAttachUrl.call(this, b
											.thumbnailRemotePath),
										thumb_secret: b.thumbnailSecretKey,
										filename: b.displayName,
										length: b.duration || 0,
										file: {},
										file_length: b.fileLength || 0,
										filetype: b.filetype || "",
										accessToken: this.token || "",
										ext: Q,
										time: Number(L),
										onlineState: D
									}, z.msgConfig && (Te.msgConfig = z
										.msgConfig), $.length > 0 && (Te
										.reactions = $), oe && (Te.chatThread =
										oe), ne && (Te.chatThreadOverview = ne),
									"chatRoom" === G && (Te.priority = H, Te
										.broadcast = W), q && (Te
										.isContentReplaced = q), V = Te, B ? [3,
										12
									] : [4, null === (h = null === (p = this
												._localCache) || void 0 === p ?
											void 0 : p.getInstance()) ||
										void 0 === h ? void 0 : h.storeMessage(
											Te, Ee.SUCCESS)
									];
							case 11:
								be.sent(), null === (f = this.eventHandler) ||
									void 0 === f || f.dispatch("onVideoMessage",
										Te), be.label = 12;
							case 12:
								return [3, 28];
							case 13:
								return !(z = {
										id: U,
										type: P,
										contentsType: xe[b.type],
										from: k,
										to: w,
										addr: b.address,
										buildingName: b.buildingName,
										lat: b.latitude,
										lng: b.longitude,
										ext: Q,
										time: L,
										msgConfig: M.msgConfig,
										onlineState: D
									}).delay && delete z.delay, !z.msgConfig &&
									delete M.msgConfig, z.error = J, z
									.errorText = Y, z.errorCode = X, !B && this
									.onLocationMessage && this
									.onLocationMessage(z), Re = {
										id: U,
										type: "loc",
										chatType: G,
										from: k,
										to: w,
										buildingName: b.buildingName,
										addr: b.address,
										lat: b.latitude,
										lng: b.longitude,
										ext: Q,
										time: Number(L),
										onlineState: D
									}, z.msgConfig && (Re.msgConfig = z
										.msgConfig), $.length > 0 && (Re
										.reactions = $), oe && (Re.chatThread =
										oe), ne && (Re.chatThreadOverview = ne),
									"chatRoom" === G && (Re.priority = H, Re
										.broadcast = W), q && (Re
										.isContentReplaced = q), V = Re, B ? [3,
										15
									] : [4, null === (g = null === (m = this
												._localCache) || void 0 === m ?
											void 0 : m.getInstance()) ||
										void 0 === g ? void 0 : g.storeMessage(
											Re, Ee.SUCCESS)
									];
							case 14:
								be.sent(), null === (E = this.eventHandler) ||
									void 0 === E || E.dispatch(
										"onLocationMessage", Re), be.label = 15;
							case 15:
								return [3, 28];
							case 16:
								return ie = this.useOwnUploadFun ? b
									.remotePath : Be.call(this, b), !(z = {
										id: U,
										type: P,
										contentsType: xe[b.type],
										from: k,
										to: w,
										url: ie,
										secret: b.secretKey,
										filename: b.displayName,
										file_length: b.fileLength || "",
										accessToken: this.token || "",
										ext: Q,
										length: b.duration,
										time: L,
										msgConfig: M.msgConfig,
										onlineState: D
									}).delay && delete z.delay, !z.msgConfig &&
									delete M.msgConfig, z.error = J, z
									.errorText = Y, z.errorCode = X, !B && this
									.onAudioMessage && this.onAudioMessage(z),
									Oe = {
										id: U,
										type: "audio",
										chatType: G,
										from: k,
										to: w,
										url: ie,
										secret: b.secretKey,
										file: {},
										filename: b.displayName,
										length: b.duration || 0,
										file_length: b.fileLength || 0,
										filetype: b.filetype || "",
										accessToken: this.token || "",
										ext: Q,
										time: Number(L),
										onlineState: D
									}, z.msgConfig && (Oe.msgConfig = z
										.msgConfig), $.length > 0 && (Oe
										.reactions = $), oe && (Oe.chatThread =
										oe), ne && (Oe.chatThreadOverview = ne),
									"chatRoom" === G && (Oe.priority = H, Oe
										.broadcast = W), q && (Oe
										.isContentReplaced = q), V = Oe, B ? [3,
										18
									] : [4, null === (v = null === (y = this
												._localCache) || void 0 === y ?
											void 0 : y.getInstance()) ||
										void 0 === v ? void 0 : v.storeMessage(
											Oe, Ee.SUCCESS)
									];
							case 17:
								be.sent(), null === (_ = this.eventHandler) ||
									void 0 === _ || _.dispatch("onAudioMessage",
										Oe), be.label = 18;
							case 18:
								return [3, 28];
							case 19:
								return ie = this.useOwnUploadFun ? b
									.remotePath : Be.call(this, b), !(z = {
										id: U,
										type: P,
										contentsType: xe[b.type],
										from: k,
										to: w,
										url: ie,
										secret: b.secretKey,
										filename: b.displayName,
										file_length: b.fileLength,
										accessToken: this.token || "",
										ext: Q,
										time: L,
										msgConfig: M.msgConfig,
										onlineState: D
									}).delay && delete z.delay, !z.msgConfig &&
									delete M.msgConfig, z.error = J, z
									.errorText = Y, z.errorCode = X, !B && this
									.onFileMessage && this.onFileMessage(z),
									Ie = {
										id: U,
										type: "file",
										chatType: G,
										from: k,
										to: w,
										url: ie,
										secret: b.secretKey,
										file: {},
										filename: b.displayName,
										length: b.duration || 0,
										file_length: b.fileLength || 0,
										filetype: b.filetype || "",
										accessToken: this.token || "",
										ext: Q,
										time: Number(L),
										onlineState: D
									}, z.msgConfig && (Ie.msgConfig = z
										.msgConfig), $.length > 0 && (Ie
										.reactions = $), oe && (Ie.chatThread =
										oe), ne && (Ie.chatThreadOverview = ne),
									"chatRoom" === G && (Ie.priority = H, Ie
										.broadcast = W), q && (Ie
										.isContentReplaced = q), V = Ie, B ? [3,
										21
									] : [4, null === (R = null === (T = this
												._localCache) || void 0 === T ?
											void 0 : T.getInstance()) ||
										void 0 === R ? void 0 : R.storeMessage(
											Ie, Ee.SUCCESS)
									];
							case 20:
								be.sent(), null === (O = this.eventHandler) ||
									void 0 === O || O.dispatch("onFileMessage",
										Ie), be.label = 21;
							case 21:
								return [3, 28];
							case 22:
								return !(z = {
										id: U,
										type: P,
										contentsType: xe[b.type],
										from: k,
										to: w,
										action: b.action,
										ext: Q,
										time: L,
										msgConfig: M.msgConfig,
										onlineState: D
									}).msgConfig && delete M.msgConfig, z
									.error = J, z.errorText = Y, z.errorCode =
									X, !B && this.onCmdMessage && this
									.onCmdMessage(z), Se = {
										id: U,
										type: "cmd",
										chatType: G,
										from: k,
										to: w,
										action: b.action,
										ext: Q,
										time: Number(L),
										onlineState: D
									}, z.msgConfig && (Se.msgConfig = z
										.msgConfig), $.length > 0 && (Se
										.reactions = $), oe && (Se.chatThread =
										oe), ne && (Se.chatThreadOverview = ne),
									"chatRoom" === G && (Se.priority = H, Se
										.broadcast = W), q && (Se
										.isContentReplaced = q), V = Se, B ||
									null === (I = this.eventHandler) ||
									void 0 === I || I.dispatch("onCmdMessage",
										Se), [3, 28];
							case 23:
								return Ce = {}, Ae = {}, M.contents[0]
									.customExts && (Ce = Ge(M.contents[0]
										.customExts)), M.contents[0].params && (
										Ae = Ge(M.contents[0].params)), z = {
										id: U,
										type: P,
										contentsType: xe[b.type],
										from: k,
										to: w,
										customEvent: b.customEvent,
										params: Ae,
										customExts: Ce,
										ext: Q,
										time: L,
										onlineState: D
									}, !B && this.onCustomMessage && this
									.onCustomMessage(z), Ne = {
										id: U,
										type: "custom",
										chatType: G,
										from: k,
										to: w,
										customEvent: b.customEvent,
										params: Ae,
										customExts: Ce,
										ext: Q,
										time: Number(L),
										onlineState: D
									}, z.msgConfig && (Ne.msgConfig = z
										.msgConfig), $.length > 0 && (Ne
										.reactions = $), oe && (Ne.chatThread =
										oe), ne && (Ne.chatThreadOverview = ne),
									ee.operationCount > 0 && (Ne.modifiedInfo =
										ee, M.type === nt.EDIT && (Ne.from = te,
											Ne.time = re)), "chatRoom" === G &&
									(Ne.priority = H, Ne.broadcast = W), q && (
										Ne.isContentReplaced = q), V = Ne, B ? [
										3, 25
									] : [4, null === (C = null === (S = this
												._localCache) || void 0 === S ?
											void 0 : S.getInstance()) ||
										void 0 === C ? void 0 : C.storeMessage(
											Ne, Ee.SUCCESS)
									];
							case 24:
								be.sent(), null === (A = this.eventHandler) ||
									void 0 === A || A.dispatch(
										"onCustomMessage", Ne), be.label = 25;
							case 25:
								return [3, 28];
							case 26:
								return ie = Be.call(this, b), Me = {
										id: U,
										type: "combine",
										chatType: G,
										to: w,
										from: k,
										ext: Q,
										time: Number(L),
										onlineState: D,
										title: b.title || "",
										summary: b.summary || "",
										url: ie || "",
										secret: b.secretKey || "",
										file_length: b.fileLength || 0,
										filename: b.displayName || "",
										compatibleText: b.text,
										combineLevel: b.combineLevel || 0
									}, z.msgConfig && (Me.msgConfig = z
										.msgConfig), $.length > 0 && (Me
										.reactions = $), oe && (Me.chatThread =
										oe), ne && (Me.chatThreadOverview = ne),
									"chatRoom" === G && (Me.priority = H, Me
										.broadcast = W), q && (Me
										.isContentReplaced = q), V = Me, !B &&
									this.eventHandler && this.eventHandler
									.dispatch("onCombineMessage", Me), [3, 28];
							case 27:
								return x.error("Unknow message type, message:",
									b), [3, 28];
							case 28:
								return j ? [2, V] : [2, z]
						}
					}))
				}))
			}

			function We(e, t, r) {
				if (this.delivery && e !== t) {
					var o = this.getUniqueId(),
						n = new ke("delivery", o);
					n.set({
						ackId: r,
						to: e
					}), x.debug("send delivery ack"), this.send(n.body)
				}
			}
			var Ke = function(e, t, r, o) {
					var n, i, a, s, c, l, u, d, p, h, m, g, E, y, v, _, T, R, O, I, S, C, A, N, M, b;
					return Le(this, void 0, void 0, (function() {
						var U, P, k, w, L, D, G, B, H, j, F, W, K, q, z, V, J, X, Y, Q, $,
							Z, ee, te, re, oe, ne, ie, ae, se, ce, le, ue, pe, he, fe, me,
							ge, Ee, _e;
						return De(this, (function(Te) {
							switch (Te.label) {
								case 0:
									if (U = new(f())(e.timestamp.low, e
											.timestamp.high, e.timestamp
											.unsigned).toString(), P = this.root
										.lookup("easemob.pb.MessageBody"), k = P
										.decode(e.payload), w = 3, L = !1, e
										.meta && e.meta.length) {
										if (D = de.parseNotify(e.meta), G = D
											.is_online, B = D.callback_replace,
											this.useReplacedMessageContents &&
											B && (L = !0), G || 0 === G)
											switch (G) {
												case 0:
													w = 0;
													break;
												case 1:
													w = 1;
													break;
												default:
													w = 2
											}
									} else w = 3;
									switch (H = new(f())(e.id.low, e.id.high, e
											.id.unsigned).toString(), j = k
										.ackMessageId ? new(f())(k.ackMessageId
											.low, k.ackMessageId.high, k
											.ackMessageId.unsigned).toString() :
										"", F = "", W = He.call(this, e, k), K =
										je.call(this, e, k), x.debug(
											"meta thirdMessage:", {
												metaId: H,
												metaNs: e.ns,
												type: k.type,
												from: W,
												to: K,
												contentType: null === (i =
														null === (n = k
															.contents) ||
														void 0 === n ? void 0 :
														n[0]) || void 0 === i ?
													void 0 : i.type,
												contentLen: null === (a = k
														.contents) || void 0 ===
													a ? void 0 : a.length
											}), k.type) {
										case nt.SINGLECHAT:
											return [3, 1];
										case nt.GROUPCHAT:
											return [3, 2];
										case nt.CHATROOM:
											return [3, 3];
										case nt.READ_ACK:
											return [3, 4];
										case nt.DELIVER_ACK:
											return [3, 5];
										case nt.RECALL:
											return [3, 6];
										case nt.CHANNEL_ACK:
											return [3, 15];
										case nt.EDIT:
											return [3, 16]
									}
									return [3, 20];
								case 1:
									return F = "chat", "agoraToken" === this
										.grantType && (F = "singleChat"), this
										.delivery && !r && W !== this.context
										.userId && We.call(this, W, K, H), [3,
											21
										];
								case 2:
									return F = "groupchat", "agoraToken" ===
										this.grantType && (F = "groupChat"), [3,
											21
										];
								case 3:
									return F = "chatroom", "agoraToken" === this
										.grantType && (F = "chatRoom"), w = 1, [
											3, 21
										];
								case 4:
									return F = "read_ack", q = void 0, k.ext[
										0] && JSON.parse(k.ext[0].stringValue) ?
										(q = {
												id: H,
												type: "read",
												from: W,
												to: K,
												mid: j,
												groupReadCount: k.ext[0] && JSON
													.parse(k.ext[0]
													.stringValue),
												ackContent: k.ackContent,
												onlineState: w
											}, this.onReadMessage && this
											.onReadMessage(q), null === (s =
												this.eventHandler) || void 0 ===
											s || s.dispatch("onReadMessage", q),
											[2]) : (q = {
												id: H,
												type: "read",
												from: W,
												to: K,
												mid: j,
												onlineState: w
											}, this.onReadMessage && this
											.onReadMessage(q), null === (c =
												this.eventHandler) || void 0 ===
											c || c.dispatch("onReadMessage", q),
											[2]);
								case 5:
									return F = "deliver_ack", this
										.onDeliveredMessage && this
										.onDeliveredMessage({
											id: H,
											type: "delivery",
											from: W,
											to: K,
											mid: j,
											onlineState: w
										}), z = {
											id: H,
											type: "delivery",
											from: W,
											to: K,
											mid: j,
											onlineState: w
										}, null === (l = this.eventHandler) ||
										void 0 === l || l.dispatch(
											"onDeliveredMessage", z), [2];
								case 6:
									return F = "recall", V = "", e.ext && (V = (
											null === (u = Ge(e.ext)) ||
											void 0 === u ? void 0 : u
											.recallMessageExtensionInfo) ||
										""), J = {
										id: H,
										from: W || "admin",
										to: K,
										mid: j,
										ext: V,
										onlineState: w
									}, X = K === this.user ? W : K, [4,
										null === (p = null === (d = this
												._localCache) || void 0 ===
											d ? void 0 : d.getInstance()) ||
										void 0 === p ? void 0 : p
										.getMessageByServerMsgId(J.mid)
									];
								case 7:
									return (Y = Te.sent()) ? [4, null === (m =
											null === (h = this
											._localCache) || void 0 === h ?
											void 0 : h.getInstance()) ||
										void 0 === m ? void 0 : m
										.removeMsgByServerMsgId(J.mid)
									] : [3, 9];
								case 8:
									Te.sent(), Te.label = 9;
								case 9:
									return "singleChat" !== (null == Y ?
											void 0 : Y.chatType) &&
										"groupChat" !== (null == Y ? void 0 : Y
											.chatType) ? [3, 14] : (Q = (null ==
												Y ? void 0 : Y.from) === this
											.user || "" === (null == Y ?
												void 0 : Y.from), [4, null === (
													E = null === (g = this
														._localCache) ||
													void 0 === g ? void 0 : g
													.getInstance()) ||
												void 0 === E ? void 0 : E
												.getConversationLastMessage(X, Y
													.chatType)
											]);
								case 10:
									return $ = Te.sent(), [4, null === (v =
											null === (y = this
											._localCache) || void 0 === y ?
											void 0 : y.getInstance()) ||
										void 0 === v ? void 0 : v
										.getConversationBySessionId(ye({
											conversationId: X,
											conversationType: Y
												.chatType
										}))
									];
								case 11:
									return (Z = Te.sent()) ? [4, null === (T =
											null === (_ = this
											._localCache) || void 0 === _ ?
											void 0 : _.getInstance()) ||
										void 0 === T ? void 0 : T
										.updateLocalConversation(ye({
											conversationId: X,
											conversationType: Y
												.chatType
										}), {
											lastMessageId: null == $ ?
												void 0 : $.serverMsgId,
											unReadCount: ve({
												conversation: Z,
												isRecallSelfMsg: Q,
												recalledMsgTime: Y
													.time
											})
										})
									] : [3, 13];
								case 12:
									Te.sent(), Te.label = 13;
								case 13:
									Te.label = 14;
								case 14:
									return this.onRecallMessage && this
										.onRecallMessage(J), null === (R = this
											.eventHandler) || void 0 === R || R
										.dispatch("onRecallMessage", J), [2];
								case 15:
									return this.onChannelMessage && this
										.onChannelMessage({
											id: H,
											type: "channel",
											chatType: "singleChat",
											from: W,
											to: K,
											time: Number(U),
											onlineState: w
										}), ee = {
											id: H,
											type: "channel",
											chatType: "singleChat",
											from: W,
											to: K,
											time: Number(U),
											onlineState: w
										}, null === (O = this.eventHandler) ||
										void 0 === O || O.dispatch(
											"onChannelMessage", ee), [2];
								case 16:
									return te = {
										errorCode: 0,
										reason: ""
									}, [4, Fe.call(this, {
										status: te,
										thirdMessage: k,
										msgBody: k.contents[0],
										msgId: H,
										type: F,
										from: W,
										to: K,
										time: U,
										onlineState: w,
										ignoreCallback: !0,
										format: !0,
										isContentReplaced: L
									})];
								case 17:
									return re = Te.sent(), oe = !!e.to && -1 !==
										e.to.domain.indexOf("conference"), re
										.chatType = oe ? "groupChat" :
										"singleChat", ne = k.editMessageId &&
										new(f())(k.editMessageId.low, k
											.editMessageId.high, k.editMessageId
											.unsigned).toString(), ie = {},
										"txt" === re.type ? (ae = re.type, se =
											re.chatType, ce = re.to, le = re
											.from, ue = re.time, pe = re
											.modifiedInfo, ie = {
												id: ne,
												type: ae,
												chatType: se,
												to: ce,
												from: le,
												time: ue,
												modifiedInfo: pe,
												msg: re.msg
											}, re.translations && (ie
												.translations = re.translations)
											) : "custom" === re.type && ((ie =
												re).id = ne, delete ie
											.onlineState), ie ? [4, null === (
												S = null === (I = this
													._localCache) || void 0 ===
												I ? void 0 : I.getInstance()) ||
											void 0 === S ? void 0 : S
											.getMessageByServerMsgId(ne)
										] : [3, 19];
								case 18:
									"txt" === (null == (he = Te.sent()) ?
										void 0 : he.type) && "txt" === ie.type ?
										null === (A = null === (C = this
												._localCache) || void 0 === C ?
											void 0 : C.getInstance()) ||
										void 0 === A || A.putMessageToDB(we(
										we({}, he), {
											msg: ie.msg,
											modifiedInfo: ie
												.modifiedInfo,
											translations: ie
												.translations
										})) : "custom" === (null == he ?
											void 0 : he.type) && "custom" === ie
										.type && (null === (M = null === (N =
													this._localCache) ||
												void 0 === N ? void 0 : N
												.getInstance()) || void 0 ===
											M || M.putMessageToDB(we(we({},
											he), {
												modifiedInfo: ie
													.modifiedInfo,
												customEvent: ie
													.customEvent,
												customExts: ie
													.customExts,
												ext: ie.ext
											}))), Te.label = 19;
								case 19:
									return "txt" !== re.type && "custom" !== re
										.type || null === (b = this
											.eventHandler) || void 0 === b || b
										.dispatch("onModifiedMessage", ie), [2];
								case 20:
									return x.error("unexpected message type: "
										.concat(k.type)), [2];
								case 21:
									fe = "normal", ge = !1, "chat" === F
										.toLowerCase() || "singleChat" === F ?
										me = "singleChat" : "groupchat" === F
										.toLowerCase() || "groupChat" === F ?
										me = "groupChat" : (me = "chatRoom", w =
											1, e.ext && (Ee = Ge(e.ext), ge = !!
												(null == Ee ? void 0 : Ee
													.is_broadcast), fe = 0 ===
												Ee.chatroom_msg_tag ? "high" :
												2 === Ee.chatroom_msg_tag ?
												"low" : "normal")), _e = 0, Te
										.label = 22;
								case 22:
									return _e < k.contents.length ? [4, Fe.call(
										this, {
											status: t,
											thirdMessage: k,
											msgBody: k.contents[_e],
											msgId: H,
											type: F,
											from: W,
											to: K,
											time: U,
											onlineState: w,
											chatType: me,
											ignoreCallback: r,
											priority: fe,
											format: o,
											broadcast: ge,
											isContentReplaced: L
										})] : [3, 25];
								case 23:
									return [2, Te.sent()];
								case 24:
									return _e++, [3, 22];
								case 25:
									return [2]
							}
						}))
					}))
				},
				qe = ["public", "members_only", "allow_user_invites", "invite_need_confirm"],
				ze = {
					name: "name",
					title: "name",
					description: "description",
					public: "public",
					members_only: "approval",
					allow_user_invites: "allowInvites",
					max_users: "maxUsers",
					invite_need_confirm: "inviteNeedConfirm",
					custom: "ext",
					last_modified: "lastModified"
				};

			function Ve(e, t) {
				var r, o, n, i, a, s, c = this,
					l = this.context,
					u = l.userId,
					d = l.jid,
					p = t.from.name === u && d.clientResource !== t.from.clientResource;
				return t.isThread ? (n = {
					id: t.mucId.name,
					name: t.mucName,
					operation: "",
					parentId: t.mucParentId.name,
					operator: t.from.name,
					userName: t.to.length ? t.to[0].name : ""
				}, i = {
					chatThreadId: t.mucId.name,
					chatThreadName: t.mucName,
					operation: "",
					parentId: t.mucParentId.name
				}) : (o = {
					type: "",
					owner: t.from.name,
					gid: t.mucId.name,
					from: t.from.name,
					fromJid: t.from,
					to: t.to.length ? t.to[0].name : "",
					toJid: t.to,
					chatroom: t.isChatroom,
					status: t.status
				}, a = {
					operation: "",
					id: t.mucId.name,
					from: t.from.name
				}, t.isChatroom && (null === (r = null == t ? void 0 : t.eventInfo) ||
					void 0 === r ? void 0 : r.ext) && (s = JSON.parse(t.eventInfo.ext))), ({
					45: function() {
						var e, r, o;
						a.operation = "memberAttributesUpdate";
						var n = JSON.parse(null === (e = null == t ? void 0 : t
							.eventInfo) || void 0 === e ? void 0 : e.ext) || {};
						a.attributes = n.properties || {}, a.userId = n.username || "", p ?
							null === (r = c.eventHandler) || void 0 === r || r.dispatch(
								"onMultiDeviceEvent", a) : null === (o = c.eventHandler) ||
							void 0 === o || o.dispatch("onGroupEvent", a)
					},
					44: function() {
						var e;
						a.operation = "removeChatRoomAttributes", a.attributes = s.result
							.successKeys, s.result.successKeys.length > 0 && (null === (e =
								c.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomEvent", a))
					},
					43: function() {
						var e;
						a.operation = "updateChatRoomAttributes";
						var t = {};
						s.result.successKeys.forEach((function(e) {
							t[e] = s.properties[e]
						})), a.attributes = t, s.result.successKeys.length > 0 && (
							null === (e = c.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomEvent", a))
					},
					42: function() {},
					41: function() {},
					40: function() {},
					39: function() {},
					38: function() {
						var e;
						i.operation = "chatThreadNameUpdate", null === (e = c
							.eventHandler) || void 0 === e || e.dispatch(
								"onMultiDeviceEvent", i)
					},
					37: function() {
						var e;
						n.operation = "userRemove", null === (e = c.eventHandler) ||
							void 0 === e || e.dispatch("onChatThreadChange", n)
					},
					36: function() {
						var e;
						i.operation = "chatThreadLeave", null === (e = c.eventHandler) ||
							void 0 === e || e.dispatch("onMultiDeviceEvent", i)
					},
					35: function() {
						var e;
						i.operation = "chatThreadJoin", null === (e = c.eventHandler) ||
							void 0 === e || e.dispatch("onMultiDeviceEvent", i)
					},
					34: function() {
						var e;
						i.operation = "chatThreadDestroy", null === (e = c.eventHandler) ||
							void 0 === e || e.dispatch("onMultiDeviceEvent", i)
					},
					33: function() {
						var e;
						i.operation = "chatThreadCreate", null === (e = c.eventHandler) ||
							void 0 === e || e.dispatch("onMultiDeviceEvent", i)
					},
					32: function() {
						var e, r, n, i;
						o.type = t.isChatroom ? "rmChatRoomMute" : "rmGroupMute", c
							.onPresence && c.onPresence(o), t.isChatroom ? null === (e = c
								.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomChange", o) : null === (r = c.eventHandler) ||
							void 0 === r || r.dispatch("onGroupChange", o), a.operation =
							"unmuteAllMembers", t.isChatroom ? null === (n = c
							.eventHandler) || void 0 === n || n.dispatch("onChatroomEvent",
								a) : null === (i = c.eventHandler) || void 0 === i || i
							.dispatch("onGroupEvent", a)
					},
					31: function() {
						var e, r, n, i;
						o.type = t.isChatroom ? "muteChatRoom" : "muteGroup", c
							.onPresence && c.onPresence(o), t.isChatroom ? null === (e = c
								.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomChange", o) : null === (r = c.eventHandler) ||
							void 0 === r || r.dispatch("onGroupChange", o), a.operation =
							"muteAllMembers", t.isChatroom ? null === (n = c
							.eventHandler) || void 0 === n || n.dispatch("onChatroomEvent",
								a) : null === (i = c.eventHandler) || void 0 === i || i
							.dispatch("onGroupEvent", a)
					},
					30: function() {
						var e, r, n, i;
						o.type = t.isChatroom ? "rmUserFromChatRoomWhiteList" :
							"rmUserFromGroupWhiteList", c.onPresence && c.onPresence(o), t
							.isChatroom ? null === (e = c.eventHandler) || void 0 === e || e
							.dispatch("onChatroomChange", o) : null === (r = c
							.eventHandler) || void 0 === r || r.dispatch("onGroupChange",
							o), a.operation = "removeAllowlistMember", t.isChatroom ?
							null === (n = c.eventHandler) || void 0 === n || n.dispatch(
								"onChatroomEvent", a) : null === (i = c.eventHandler) ||
							void 0 === i || i.dispatch("onGroupEvent", a)
					},
					29: function() {
						var e, r, n, i;
						o.type = t.isChatroom ? "addUserToChatRoomWhiteList" :
							"addUserToGroupWhiteList", c.onPresence && c.onPresence(o), t
							.isChatroom ? null === (e = c.eventHandler) || void 0 === e || e
							.dispatch("onChatroomChange", o) : null === (r = c
							.eventHandler) || void 0 === r || r.dispatch("onGroupChange",
							o), a.operation = "addUserToAllowlist", t.isChatroom ? null ===
							(n = c.eventHandler) || void 0 === n || n.dispatch(
								"onChatroomEvent", a) : null === (i = c.eventHandler) ||
							void 0 === i || i.dispatch("onGroupEvent", a)
					},
					28: function() {
						var e, r, n, i;
						o.type = "deleteFile", c.onPresence && c.onPresence(o), t
							.isChatroom ? null === (e = c.eventHandler) || void 0 === e || e
							.dispatch("onChatroomChange", o) : null === (r = c
							.eventHandler) || void 0 === r || r.dispatch("onGroupChange",
							o), a.operation = "deleteFile", t.isChatroom ? null === (n = c
								.eventHandler) || void 0 === n || n.dispatch(
								"onChatroomEvent", a) : null === (i = c.eventHandler) ||
							void 0 === i || i.dispatch("onGroupEvent", a)
					},
					27: function() {
						var e, r, n, i;
						o.type = "uploadFile", c.onPresence && c.onPresence(o), t
							.isChatroom ? null === (e = c.eventHandler) || void 0 === e || e
							.dispatch("onChatroomChange", o) : null === (r = c
							.eventHandler) || void 0 === r || r.dispatch("onGroupChange",
							o), a.operation = "uploadFile", t.isChatroom ? null === (n = c
								.eventHandler) || void 0 === n || n.dispatch(
								"onChatroomEvent", a) : null === (i = c.eventHandler) ||
							void 0 === i || i.dispatch("onGroupEvent", a)
					},
					26: function() {
						var e, r, n, i;
						o.type = "deleteAnnouncement", c.onPresence && c.onPresence(o), t
							.isChatroom ? null === (e = c.eventHandler) || void 0 === e || e
							.dispatch("onChatroomChange", o) : null === (r = c
							.eventHandler) || void 0 === r || r.dispatch("onGroupChange",
							o), a.operation = "deleteAnnouncement", t.isChatroom ? null ===
							(n = c.eventHandler) || void 0 === n || n.dispatch(
								"onChatroomEvent", a) : null === (i = c.eventHandler) ||
							void 0 === i || i.dispatch("onGroupEvent", a)
					},
					25: function() {
						var e, r, n, i;
						o.type = "updateAnnouncement", c.onPresence && c.onPresence(o), t
							.isChatroom ? null === (e = c.eventHandler) || void 0 === e || e
							.dispatch("onChatroomChange", o) : null === (r = c
							.eventHandler) || void 0 === r || r.dispatch("onGroupChange",
							o), a.operation = "updateAnnouncement", t.isChatroom ? null ===
							(n = c.eventHandler) || void 0 === n || n.dispatch(
								"onChatroomEvent", a) : null === (i = c.eventHandler) ||
							void 0 === i || i.dispatch("onGroupEvent", a)
					},
					24: function() {
						var e, r, n, i;
						o.type = "removeMute", c.onPresence && c.onPresence(o), t
							.isChatroom ? null === (e = c.eventHandler) || void 0 === e || e
							.dispatch("onChatroomChange", o) : null === (r = c
							.eventHandler) || void 0 === r || r.dispatch("onGroupChange",
							o), a.operation = "unmuteMember", t.isChatroom ? null === (n = c
								.eventHandler) || void 0 === n || n.dispatch(
								"onChatroomEvent", a) : null === (i = c.eventHandler) ||
							void 0 === i || i.dispatch("onGroupEvent", a)
					},
					23: function() {
						var e, r, n, i;
						o.type = "addMute", c.onPresence && c.onPresence(o), t.isChatroom ?
							null === (e = c.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomChange", o) : null === (r = c.eventHandler) ||
							void 0 === r || r.dispatch("onGroupChange", o), a.operation =
							"muteMember", t.isChatroom ? null === (n = c.eventHandler) ||
							void 0 === n || n.dispatch("onChatroomEvent", a) : null === (i =
								c.eventHandler) || void 0 === i || i.dispatch(
								"onGroupEvent", a)
					},
					22: function() {
						var e, r, n, i;
						o.type = "removeAdmin", c.onPresence && c.onPresence(o), t
							.isChatroom ? null === (e = c.eventHandler) || void 0 === e || e
							.dispatch("onChatroomChange", o) : null === (r = c
							.eventHandler) || void 0 === r || r.dispatch("onGroupChange",
							o), a.operation = "removeAdmin", t.isChatroom ? null === (n = c
								.eventHandler) || void 0 === n || n.dispatch(
								"onChatroomEvent", a) : null === (i = c.eventHandler) ||
							void 0 === i || i.dispatch("onGroupEvent", a)
					},
					21: function() {
						var e, r, n, i;
						o.type = "addAdmin", c.onPresence && c.onPresence(o), t.isChatroom ?
							null === (e = c.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomChange", o) : null === (r = c.eventHandler) ||
							void 0 === r || r.dispatch("onGroupChange", o), a.operation =
							"setAdmin", t.isChatroom ? null === (n = c.eventHandler) ||
							void 0 === n || n.dispatch("onChatroomEvent", a) : null === (i =
								c.eventHandler) || void 0 === i || i.dispatch(
								"onGroupEvent", a)
					},
					20: function() {
						var e, r, n, i;
						o.type = "changeOwner", c.onPresence && c.onPresence(o), t
							.isChatroom ? null === (e = c.eventHandler) || void 0 === e || e
							.dispatch("onChatroomChange", o) : null === (r = c
							.eventHandler) || void 0 === r || r.dispatch("onGroupChange",
							o), a.operation = "changeOwner", t.isChatroom ? null === (n = c
								.eventHandler) || void 0 === n || n.dispatch(
								"onChatroomEvent", a) : null === (i = c.eventHandler) ||
							void 0 === i || i.dispatch("onGroupEvent", a)
					},
					19: function() {
						var e, r, n, i;
						o.type = "direct_joined", o.groupName = t.mucName, c.onPresence && c
							.onPresence(o), t.isChatroom ? null === (e = c.eventHandler) ||
							void 0 === e || e.dispatch("onChatroomChange", o) : null === (
								r = c.eventHandler) || void 0 === r || r.dispatch(
								"onGroupChange", o), a.operation = "directJoined", a.name =
							t.mucName, t.isChatroom ? null === (n = c.eventHandler) ||
							void 0 === n || n.dispatch("onChatroomEvent", a) : null === (i =
								c.eventHandler) || void 0 === i || i.dispatch(
								"onGroupEvent", a)
					},
					18: function() {
						var e, r, n, i;
						o.type = t.isChatroom ? "leaveChatRoom" : "leaveGroup", c
							.onPresence && c.onPresence(o);
						var s = t.mucMemberCount;
						s && (a.memberCount = s), t.isChatroom ? null === (e = c
								.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomChange", o) : null === (r = c.eventHandler) ||
							void 0 === r || r.dispatch("onGroupChange", o), a.operation =
							"memberAbsence", t.isChatroom ? null === (n = c.eventHandler) ||
							void 0 === n || n.dispatch("onChatroomEvent", a) : null === (i =
								c.eventHandler) || void 0 === i || i.dispatch(
								"onGroupEvent", a)
					},
					17: function() {
						var e, r, n, i;
						o.type = t.isChatroom ? "memberJoinChatRoomSuccess" :
							"memberJoinPublicGroupSuccess", c.onPresence && c.onPresence(o);
						var s = t.mucMemberCount;
						t.isChatroom ? null === (e = c.eventHandler) || void 0 === e || e
							.dispatch("onChatroomChange", o) : null === (r = c
							.eventHandler) || void 0 === r || r.dispatch("onGroupChange",
							o), a.operation = "memberPresence", s && (a.memberCount = s), t
							.isChatroom && t.ext && (a.ext = t.ext), t.isChatroom ? null ===
							(n = c.eventHandler) || void 0 === n || n.dispatch(
								"onChatroomEvent", a) : null === (i = c.eventHandler) ||
							void 0 === i || i.dispatch("onGroupEvent", a)
					},
					16: function() {
						var e, r;
						o.type = "unblock", c.onPresence && c.onPresence(o), t.isChatroom ?
							null === (e = c.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomChange", o) : null === (r = c.eventHandler) ||
							void 0 === r || r.dispatch("onGroupChange", o)
					},
					15: function() {
						var e, r;
						o.type = "block", c.onPresence && c.onPresence(o), t.isChatroom ?
							null === (e = c.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomChange", o) : null === (r = c.eventHandler) ||
							void 0 === r || r.dispatch("onGroupChange", o)
					},
					14: function() {
						var e, r, n, i, s, l = t.isChatroom;
						if (!l) {
							var u = JSON.parse((null === (e = null == t ? void 0 : t
									.eventInfo) || void 0 === e ? void 0 : e.ext) ||
								"{}", (function(e, t) {
									return "last_modified" === e ? Number(t) : qe
										.includes(e) ? "true" === t || !0 === t : t
								}));
							a.detail = o.detail = {}, Object.keys(u).forEach((function(e) {
								var t = ze[e];
								if (t) {
									var r = u[e];
									a.detail && (a.detail[t] = r), o.detail && (
										o.detail[t] = r)
								}
							}))
						}
						o.type = "update", c.onPresence && c.onPresence(o), l ? null === (
								r = c.eventHandler) || void 0 === r || r.dispatch(
								"onChatroomChange", o) : null === (n = c.eventHandler) ||
							void 0 === n || n.dispatch("onGroupChange", o), a.operation =
							"updateInfo", l ? null === (i = c.eventHandler) || void 0 ===
							i || i.dispatch("onChatroomEvent", a) : null === (s = c
								.eventHandler) || void 0 === s || s.dispatch("onGroupEvent",
								a)
					},
					13: function() {
						var e, r, n, i;
						o.type = "allow", o.reason = t.reason, c.onPresence && c.onPresence(
								o), t.isChatroom ? null === (e = c.eventHandler) ||
							void 0 === e || e.dispatch("onChatroomChange", o) : null === (
								r = c.eventHandler) || void 0 === r || r.dispatch(
								"onGroupChange", o), a.operation = "unblockMember", t
							.isChatroom ? null === (n = c.eventHandler) || void 0 === n || n
							.dispatch("onChatroomEvent", a) : null === (i = c
							.eventHandler) || void 0 === i || i.dispatch("onGroupEvent", a)
					},
					12: function() {
						var e, r;
						o.type = "ban", c.onPresence && c.onPresence(o), t.isChatroom ?
							null === (e = c.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomChange", o) : null === (r = c.eventHandler) ||
							void 0 === r || r.dispatch("onGroupChange", o)
					},
					11: function() {
						var e, r;
						o.type = "getBlackList", c.onPresence && c.onPresence(o), t
							.isChatroom ? null === (e = c.eventHandler) || void 0 === e || e
							.dispatch("onChatroomChange", o) : null === (r = c
							.eventHandler) || void 0 === r || r.dispatch("onGroupChange", o)
					},
					10: function() {
						var e, r, n, i;
						o.type = "removedFromGroup", o.kicked = o.to, c.onPresence && c
							.onPresence(o), t.isChatroom ? null === (e = c.eventHandler) ||
							void 0 === e || e.dispatch("onChatroomChange", o) : null === (
								r = c.eventHandler) || void 0 === r || r.dispatch(
								"onGroupChange", o), a.operation = "removeMember", t
							.isChatroom ? null === (n = c.eventHandler) || void 0 === n || n
							.dispatch("onChatroomEvent", a) : null === (i = c
							.eventHandler) || void 0 === i || i.dispatch("onGroupEvent", a)
					},
					9: function() {
						var e, r, n, i;
						o.type = "invite_decline", o.kicked = o.to, c.onPresence && c
							.onPresence(o), t.isChatroom ? null === (e = c.eventHandler) ||
							void 0 === e || e.dispatch("onChatroomChange", o) : null === (
								r = c.eventHandler) || void 0 === r || r.dispatch(
								"onGroupChange", o), a.operation = "rejectInvite", t
							.isChatroom ? null === (n = c.eventHandler) || void 0 === n || n
							.dispatch("onChatroomEvent", a) : null === (i = c
							.eventHandler) || void 0 === i || i.dispatch("onGroupEvent", a)
					},
					8: function() {
						var e, r, n, i;
						o.type = "invite_accept", o.kicked = o.to, c.onPresence && c
							.onPresence(o), t.isChatroom ? null === (e = c.eventHandler) ||
							void 0 === e || e.dispatch("onChatroomChange", o) : null === (
								r = c.eventHandler) || void 0 === r || r.dispatch(
								"onGroupChange", o), a.operation = "acceptInvite", t
							.isChatroom ? null === (n = c.eventHandler) || void 0 === n || n
							.dispatch("onChatroomEvent", a) : null === (i = c
							.eventHandler) || void 0 === i || i.dispatch("onGroupEvent", a)
					},
					7: function() {
						var e, r, n, i;
						o.type = "invite", o.kicked = o.to, o.groupName = t.mucName, c
							.onPresence && c.onPresence(o), t.isChatroom ? null === (e = c
								.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomChange", o) : null === (r = c.eventHandler) ||
							void 0 === r || r.dispatch("onGroupChange", o), a.operation =
							"inviteToJoin", a.name = t.mucName, t.isChatroom ? null === (n =
								c.eventHandler) || void 0 === n || n.dispatch(
								"onChatroomEvent", a) : null === (i = c.eventHandler) ||
							void 0 === i || i.dispatch("onGroupEvent", a)
					},
					6: function() {
						var e, r, n, i;
						o.type = "joinPublicGroupDeclined", c.onPresence && c.onPresence(o),
							t.isChatroom ? null === (e = c.eventHandler) || void 0 === e ||
							e.dispatch("onChatroomChange", o) : null === (r = c
								.eventHandler) || void 0 === r || r.dispatch(
								"onGroupChange", o), a.operation =
							"joinPublicGroupDeclined", t.isChatroom ? null === (n = c
								.eventHandler) || void 0 === n || n.dispatch(
								"onChatroomEvent", a) : (a.userId = t.to.length ? t.to[0]
								.name : "", null === (i = c.eventHandler) || void 0 === i ||
								i.dispatch("onGroupEvent", a))
					},
					5: function() {
						var e, r, n, i;
						o.type = "joinPublicGroupSuccess", c.onPresence && c.onPresence(o),
							t.isChatroom ? null === (e = c.eventHandler) || void 0 === e ||
							e.dispatch("onChatroomChange", o) : null === (r = c
								.eventHandler) || void 0 === r || r.dispatch(
								"onGroupChange", o), a.operation = "acceptRequest", t
							.isChatroom ? null === (n = c.eventHandler) || void 0 === n || n
							.dispatch("onChatroomEvent", a) : null === (i = c
							.eventHandler) || void 0 === i || i.dispatch("onGroupEvent", a)
					},
					4: function() {
						var e, r, n, i;
						o.type = "joinGroupNotifications", o.reason = t.reason, c
							.onPresence && c.onPresence(o), t.isChatroom ? null === (e = c
								.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomChange", o) : null === (r = c.eventHandler) ||
							void 0 === r || r.dispatch("onGroupChange", o), a.operation =
							"requestToJoin", t.isChatroom ? null === (n = c.eventHandler) ||
							void 0 === n || n.dispatch("onChatroomEvent", a) : null === (i =
								c.eventHandler) || void 0 === i || i.dispatch(
								"onGroupEvent", a)
					},
					3: function() {
						var e, r;
						o.type = "leave", c.onPresence && c.onPresence(o), t.isChatroom ?
							null === (e = c.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomChange", o) : null === (r = c.eventHandler) ||
							void 0 === r || r.dispatch("onGroupChange", o)
					},
					2: function() {
						var e, r;
						o.type = "join", c.onPresence && c.onPresence(o), t.isChatroom ?
							null === (e = c.eventHandler) || void 0 === e || e.dispatch(
								"onChatroomChange", o) : null === (r = c.eventHandler) ||
							void 0 === r || r.dispatch("onGroupChange", o)
					},
					1: function() {
						var e, r, n, i;
						o.type = "deleteGroupChat", c.onPresence && c.onPresence(o), t
							.isChatroom ? null === (e = c.eventHandler) || void 0 === e || e
							.dispatch("onChatroomChange", o) : null === (r = c
							.eventHandler) || void 0 === r || r.dispatch("onGroupChange",
							o), a.operation = "destroy", t.isChatroom ? null === (n = c
								.eventHandler) || void 0 === n || n.dispatch(
								"onChatroomEvent", a) : null === (i = c.eventHandler) ||
							void 0 === i || i.dispatch("onGroupEvent", a)
					},
					0: function() {
						var e, r;
						a.operation = "create", t.isChatroom ? null === (e = c
							.eventHandler) || void 0 === e || e.dispatch("onChatroomEvent",
								a) : null === (r = c.eventHandler) || void 0 === r || r
							.dispatch("onGroupEvent", a)
					}
				} [e] || function() {
					console.error("No match operation ".concat(e))
				})()
			}
			var Je, Xe = function(e) {
					var t = this.root.lookup("easemob.pb.MUCBody").decode(e.payload),
						r = t.operation;
					x.debug("onMucMessage", t), Ve.call(this, r, t)
				},
				Ye = {
					handleRosterMsg: function(e) {
						var t, r, o, n, i, a, s = this.root.lookup("easemob.pb.RosterBody").decode(e
								.payload),
							c = {
								type: "",
								to: s.to[0].name,
								from: s.from.name,
								status: s.reason
							};
						switch (s.operation) {
							case 2:
								c.type = "subscribe", this.onContactInvited && this
									.onContactInvited(c), null === (t = this.eventHandler) ||
									void 0 === t || t.dispatch("onContactInvited", c);
								break;
							case 3:
								c.type = "unsubscribed", this.onContactDeleted && this
									.onContactDeleted(c), null === (r = this.eventHandler) ||
									void 0 === r || r.dispatch("onContactDeleted", c);
								break;
							case 4:
								c.type = "subscribed", this.onContactAdded && this.onContactAdded(
									c), null === (o = this.eventHandler) || void 0 === o || o
									.dispatch("onContactAdded", c);
								break;
							case 5:
								c.type = "unsubscribed", this.onContactRefuse && this
									.onContactRefuse(c), null === (n = this.eventHandler) ||
									void 0 === n || n.dispatch("onContactRefuse", c);
								break;
							case 6:
							case 7:
								break;
							case 8:
								c.type = "subscribed", this.onContactAgreed && this.onContactAgreed(
										c), null === (i = this.eventHandler) || void 0 === i || i
									.dispatch("onContactAgreed", c);
								break;
							case 9:
								c.type = "unsubscribed", this.onContactRefuse && this
									.onContactRefuse(c), null === (a = this.eventHandler) ||
									void 0 === a || a.dispatch("onContactRefuse", c);
								break;
							default:
								x.error("handleRosterMsg:", s)
						}
						this.onPresence && c.type && this.onPresence(c)
					}
				},
				Qe = function(e) {
					var t, r, o, n, i, a, s = this.root.lookup("easemob.pb.StatisticsBody").decode(e
							.payload),
						c = s.operation,
						l = s.reason;
					switch (c) {
						case 0:
							this.onStatisticMessage && this.onStatisticMessage(s), null === (t = this
								.eventHandler) || void 0 === t || t.dispatch("onStatisticMessage",
								s);
							break;
						case 1:
							a = m.create({
									type: d.WEBIM_CONNCTION_USER_REMOVED,
									message: "user has been removed"
								}), this.disconnectedReason = a, this.logOut = !0, this.onError && this
								.onError(a), null === (r = this.eventHandler) || void 0 === r || r
								.dispatch("onError", a);
							break;
						case 2:
							a = m.create({
									type: d.WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE,
									message: "the user is already logged on another device"
								}), l && (a.data = {
									loginInfoCustomExt: s.reason
								}), this.disconnectedReason = a, this.logOut = !0, this.onError && this
								.onError(a), null === (o = this.eventHandler) || void 0 === o || o
								.dispatch("onError", a);
							break;
						case 3:
							a = m.create({
									type: d.WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD,
									message: "the user was kicked by changing password"
								}), this.disconnectedReason = a, this.logOut = !0, this.onError && this
								.onError(a), null === (n = this.eventHandler) || void 0 === n || n
								.dispatch("onError", a);
							break;
						case 4:
							a = m.create({
									type: d.WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE,
									message: "the user was kicked by other device"
								}), this.disconnectedReason = a, this.logOut = !0, this.onError && this
								.onError(a), null === (i = this.eventHandler) || void 0 === i || i
								.dispatch("onError", a);
							break;
						default:
							x.error("handleStatisticsMsg:", s)
					}
				};

			function $e(e) {
				var t, r = [],
					o = [],
					n = e.data;
				n && n.values && n.values.forEach((function(e) {
					Object.entries(e.status).forEach((function(e) {
						o.push({
							device: e[0],
							status: Number(e[1])
						})
					})), r.push({
						userId: e.uid,
						lastTime: Number(e.last_time),
						expire: Number(e.expiry),
						ext: e.ext,
						statusDetails: o
					})
				})), this.onPresenceStatusChange && this.onPresenceStatusChange(r), null === (t =
					this.eventHandler) || void 0 === t || t.dispatch("onPresenceStatusChange", r)
			}

			function Ze(e) {
				var t = this;
				e.data.forEach((function(e) {
					var r, o = {
						from: e.from,
						to: e.to,
						chatType: "chat" === e.channel_type ? "singleChat" :
							"groupChat",
						messageId: e.messageId,
						reactions: e.reactions,
						ts: e.ts
					};
					null === (r = t.eventHandler) || void 0 === r || r.dispatch(
						"onReactionChange", o)
				}))
			}

			function et(e) {
				var t, r, o, n;
				if (e.data) {
					var i = e.data,
						a = {
							id: i.id || "",
							name: i.name || "",
							parentId: i.muc_parent_id || "",
							messageId: i.msg_parent_id || "",
							timestamp: i.timestamp || 0,
							operator: i.from || "",
							operation: ""
						};
					switch (i.operation) {
						case "create":
							a.operation = "create", a.createTimestamp = a.timestamp, a.messageCount = 0,
								null === (t = this.eventHandler) || void 0 === t || t.dispatch(
									"onChatThreadChange", a);
							break;
						case "update_msg":
							a.operation = "update", a.messageCount = i.message_count, i.last_message &&
								"{}" !== JSON.stringify(i.last_message) ? a.lastMessage = ge.call(this,
									i.last_message) : "{}" === JSON.stringify(i.last_message) && (a
									.lastMessage = {}), null === (r = this.eventHandler) || void 0 ===
								r || r.dispatch("onChatThreadChange", a);
							break;
						case "update":
							a.operation = "update", a.messageCount = i.message_count, null === (o = this
								.eventHandler) || void 0 === o || o.dispatch("onChatThreadChange",
								a);
							break;
						case "delete":
							a.operation = "destroy", null === (n = this.eventHandler) || void 0 === n ||
								n.dispatch("onChatThreadChange", a)
					}
				}
			}

			function rt(e) {
				var t, r = e.data;
				if (r.resource !== this.clientResource) {
					var o = {
						operation: "deleteRoaming",
						conversationId: r.to,
						chatType: "chat" === r.chatType ? "singleChat" : "groupChat",
						resource: r.resource
					};
					null === (t = this.eventHandler) || void 0 === t || t.dispatch("onMultiDeviceEvent",
						o)
				}
			}

			function ot(e) {
				var t, r, o = e.data,
					n = "";
				if (this.clientResource !== o.res) {
					switch (o.op) {
						case "del":
							n = "deleteConversation";
							break;
						case "top":
							n = "pinnedConversation";
							break;
						case "not_top":
							n = "unpinnedConversation";
							break;
						case "mark":
							n = "markConversation";
							break;
						case "mark_delete":
							n = "unMarkConversation";
							break;
						case "pin":
							n = "pin";
							break;
						case "pin_delete":
							n = "unpin";
							break;
						default:
							return void x.error("unexpected conversation op:", o.op)
					}
					if ("pin" !== n && "unpin" !== n) {
						var i = {
							operation: n,
							conversationId: o.id,
							conversationType: "chat" === o.type ? "singleChat" : "groupChat",
							timestamp: o.ts
						};
						"markConversation" !== i.operation && "unMarkConversation" !== i.operation || o
							.ext && (i.conversationMark = Je[o.ext]), null === (r = this
							.eventHandler) || void 0 === r || r.dispatch("onMultiDeviceEvent", i)
					} else {
						var a = o.ext,
							s = o.from,
							c = o.id,
							l = o.type,
							u = o.ts,
							d = {
								messageId: a || "",
								conversationId: c,
								conversationType: me[l],
								operation: n,
								operatorId: s,
								time: u
							};
						null === (t = this.eventHandler) || void 0 === t || t.dispatch(
							"onMessagePinEvent", d)
					}
				}
			}! function(e) {
				e[e.mark_0 = 0] = "mark_0", e[e.mark_1 = 1] = "mark_1", e[e.mark_2 = 2] = "mark_2", e[e
						.mark_3 = 3] = "mark_3", e[e.mark_4 = 4] = "mark_4", e[e.mark_5 = 5] = "mark_5",
					e[e.mark_6 = 6] = "mark_6", e[e.mark_7 = 7] = "mark_7", e[e.mark_8 = 8] = "mark_8",
					e[e.mark_9 = 9] = "mark_9", e[e.mark_10 = 10] = "mark_10", e[e.mark_11 = 11] =
					"mark_11", e[e.mark_12 = 12] = "mark_12", e[e.mark_13 = 13] = "mark_13", e[e
						.mark_14 = 14] = "mark_14", e[e.mark_15 = 15] = "mark_15", e[e.mark_16 = 16] =
					"mark_16", e[e.mark_17 = 17] = "mark_17", e[e.mark_18 = 18] = "mark_18", e[e
						.mark_19 = 19] = "mark_19"
			}(Je || (Je = {}));
			var nt, it, at = function(e) {
					var t = de.parseNotify(e.payload);
					switch (t.type) {
						case "presence":
							$e.call(this, t);
							break;
						case "reaction":
							Ze.call(this, t);
							break;
						case "thread":
							et.call(this, t);
							break;
						case "roaming_delete":
							rt.call(this, t);
							break;
						case "conv":
							ot.call(this, t);
							break;
						default:
							x.error("unexpected notify type: ".concat(t.type))
					}
				},
				st = 2,
				ct = function() {
					return ct = Object.assign || function(e) {
						for (var t, r = 1, o = arguments.length; r < o; r++)
							for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t,
								n) && (e[n] = t[n]);
						return e
					}, ct.apply(this, arguments)
				},
				lt = function(e, t, r, o) {
					return new(r || (r = Promise))((function(n, i) {
						function a(e) {
							try {
								c(o.next(e))
							} catch (e) {
								i(e)
							}
						}

						function s(e) {
							try {
								c(o.throw(e))
							} catch (e) {
								i(e)
							}
						}

						function c(e) {
							var t;
							e.done ? n(e.value) : (t = e.value, t instanceof r ? t : new r((
								function(e) {
									e(t)
								}))).then(a, s)
						}
						c((o = o.apply(e, t || [])).next())
					}))
				},
				ut = function(e, t) {
					var r, o, n, i, a = {
						label: 0,
						sent: function() {
							if (1 & n[0]) throw n[1];
							return n[1]
						},
						trys: [],
						ops: []
					};
					return i = {
						next: s(0),
						throw: s(1),
						return: s(2)
					}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
						return this
					}), i;

					function s(i) {
						return function(s) {
							return function(i) {
								if (r) throw new TypeError("Generator is already executing.");
								for (; a;) try {
									if (r = 1, o && (n = 2 & i[0] ? o.return : i[0] ? o
											.throw || ((n = o.return) && n.call(o), 0) : o
											.next) && !(n = n.call(o, i[1])).done) return n;
									switch (o = 0, n && (i = [2 & i[0], n.value]), i[0]) {
										case 0:
										case 1:
											n = i;
											break;
										case 4:
											return a.label++, {
												value: i[1],
												done: !1
											};
										case 5:
											a.label++, o = i[1], i = [0];
											continue;
										case 7:
											i = a.ops.pop(), a.trys.pop();
											continue;
										default:
											if (!((n = (n = a.trys).length > 0 && n[n
														.length - 1]) || 6 !== i[0] && 2 !==
													i[0])) {
												a = 0;
												continue
											}
											if (3 === i[0] && (!n || i[1] > n[0] && i[1] <
													n[3])) {
												a.label = i[1];
												break
											}
											if (6 === i[0] && a.label < n[1]) {
												a.label = n[1], n = i;
												break
											}
											if (n && a.label < n[2]) {
												a.label = n[2], a.ops.push(i);
												break
											}
											n[2] && a.ops.pop(), a.trys.pop();
											continue
									}
									i = t.call(e, a)
								} catch (e) {
									i = [6, e], o = 0
								} finally {
									r = n = 0
								}
								if (5 & i[0]) throw i[1];
								return {
									value: i[0] ? i[1] : void 0,
									done: !0
								}
							}([i, s])
						}
					}
				},
				dt = function(e, t, r) {
					if (r || 2 === arguments.length)
						for (var o, n = 0, i = t.length; n < i; n++) !o && n in t || (o || (o = Array
							.prototype.slice.call(t, 0, n)), o[n] = t[n]);
					return e.concat(o || Array.prototype.slice.call(t))
				};
			! function(e) {
				e[e.NORMAL = 0] = "NORMAL", e[e.SINGLECHAT = 1] = "SINGLECHAT", e[e.GROUPCHAT = 2] =
					"GROUPCHAT", e[e.CHATROOM = 3] = "CHATROOM", e[e.READ_ACK = 4] = "READ_ACK", e[e
						.DELIVER_ACK = 5] = "DELIVER_ACK", e[e.RECALL = 6] = "RECALL", e[e.CHANNEL_ACK =
						7] = "CHANNEL_ACK", e[e.EDIT = 8] = "EDIT"
			}(nt || (nt = {})),
			function(e) {
				e[e.OK = 0] = "OK", e[e.FAIL = 1] = "FAIL", e[e.UNAUTHORIZED = 2] = "UNAUTHORIZED", e[e
						.MISSING_PARAMETER = 3] = "MISSING_PARAMETER", e[e.WRONG_PARAMETER = 4] =
					"WRONG_PARAMETER", e[e.REDIRECT = 5] = "REDIRECT", e[e.TOKEN_EXPIRED = 6] =
					"TOKEN_EXPIRED", e[e.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", e[e.NO_ROUTE =
					8] = "NO_ROUTE", e[e.UNKNOWN_COMMAND = 9] = "UNKNOWN_COMMAND", e[e.PB_PARSER_ERROR =
						10] = "PB_PARSER_ERROR", e[e.BIND_ANOTHER_DEVICE = 11] = "BIND_ANOTHER_DEVICE",
					e[e.IM_FORBIDDEN = 12] = "IM_FORBIDDEN", e[e.TOO_MANY_DEVICES = 13] =
					"TOO_MANY_DEVICES", e[e.PLATFORM_LIMIT = 14] = "PLATFORM_LIMIT", e[e.USER_MUTED =
						15] = "USER_MUTED", e[e.ENCRYPT_DISABLE = 16] = "ENCRYPT_DISABLE", e[e
						.ENCRYPT_ENABLE = 17] = "ENCRYPT_ENABLE", e[e.DECRYPT_FAILURE = 18] =
					"DECRYPT_FAILURE", e[e.PERMISSION_DENIED_EXTERNAL = 19] =
					"PERMISSION_DENIED_EXTERNAL"
			}(it || (it = {}));
			var pt = ["txt", "img", "video", "audio", "file", "loc", "custom", "cmd", "combine"],
				ht = de.getEnvInfo();

			function ft() {
				var e = "webim",
					t = "",
					r = "",
					o = [],
					n = (new Date).valueOf(),
					i = de.getDevicePlatform(ht);
				if (this.isFixedDeviceId) {
					var a = de.getLocalDeviceInfo();
					if (a) {
						var s = JSON.parse(a);
						e = s.deviceId, t = s.deviceName, r = s.deviceUuid
					} else "webim" === this.deviceId ? (r = "".concat(i, "_").concat(n.toString()), e =
							"".concat(this.deviceId, "_").concat(r), t = this.deviceId) : e = t = r =
						"webim_".concat(i, "_").concat(this.deviceId), de.setLocalDeviceInfo(JSON
							.stringify({
								deviceId: e,
								deviceName: t,
								deviceUuid: r
							}))
				} else "webim" === this.deviceId ? (r = "random_".concat(i, "_").concat(n.toString()),
						e = "".concat(this.deviceId, "_").concat(r), t = this.deviceId) : e = t = r =
					"webim_".concat(i, "_").concat(this.deviceId);
				this.context.jid && (this.context.jid.clientResource = e);
				var c = this.root.lookup("easemob.pb.Provision"),
					l = c.decode(o);
				l.compressType = this.compressType, l.encryptType = this.encryptType, l.osType = this
					.osType, l.version = this.version, l.deviceName = t, l.resource = e, l.deviceUuid =
					r, l.authToken = '{"token":"$t$' + this.token + '"}', l.sessionId = Date.now()
					.toString() + ":", this.loginInfoCustomExt && (l.reason = this.loginInfoCustomExt),
					x.debug("provision info", {
						version: this.version,
						resource: e,
						isFixedDeviceId: this.isFixedDeviceId,
						loginInfoCustomExt: !!this.loginInfoCustomExt,
						token: !!this.token
					}), l.actionVersion = "v4.0", l = c.encode(l).finish();
				var u = this.root.lookup("easemob.pb.MSync"),
					d = u.decode(o);
				return d.version = this.version, d.guid = this.context.jid, d.auth = "$t$" + this.token,
					d.command = 3, d.deviceId = t, d.serviceId = this.dataReport.getServiceId(), d
					.encryptType = this.encryptType, d.payload = l, u.encode(d).finish()
			}

			function mt(e, t) {
				var r = this,
					o = de.getEnvInfo();
				if ("web" === o.platform || "zfb" === o.platform || "dd" === o.platform) {
					for (var n = "", i = 0; i < e.length; i++) n += String.fromCharCode(e[i]);
					return n = he().btoa(n), "web" === o.platform ? n : {
						data: n,
						isBuffer: !1,
						complete: function() {},
						fail: function(e) {
							"sendSocketMessage:fail taskID not exist" !== e.errMsg &&
								"SocketTast.send:fail SocketTask.readyState is not OPEN" !== e
								.errMsg || (x.debug("send message fail and reconnect"), r
									.reconnecting || r.reconnect()), t && r._msgHash && r
								._msgHash[t] && r._msgHash[t].fail({
									id: t
								})
						}
					}
				}
				var a = e;
				return {
					data: a.buffer.slice(a.byteOffset, a.byteOffset + a.byteLength),
					fail: function(e) {
						"sendSocketMessage:fail taskID not exist" !== e.errMsg &&
							"SocketTast.send:fail SocketTask.readyState is not OPEN" !== e.errMsg ||
							r.reconnecting || r.reconnect(), t && r._msgHash && r._msgHash[t] && r
							._msgHash[t].fail({
								id: t
							})
					}
				}
			}

			function gt(e, t) {
				var r;
				return lt(this, void 0, void 0, (function() {
					var o, n, i, a, s, c;
					return ut(this, (function(l) {
						switch (l.label) {
							case 0:
								for (x.debug("distributeMeta, metas length: ", e
										.length), o = [], n = function(r) {
										var n = e[r],
											a = new(f())(n.id.low, n.id.high, n
												.id.unsigned).toString(),
											s = n.from.name,
											c = n.to ? n.to.name : "",
											l = !!n.to && -1 !== n.to.domain
											.indexOf("conference");
										if (i._load_msg_cache.some((function(
											e) {
												return e.msgId === a
											}))) return "continue";
										switch (i._load_msg_cache.length <= i
											.max_cache_length || i
											._load_msg_cache.shift(), i
											._load_msg_cache.push({
												msgId: a,
												from: s,
												to: c,
												isGroup: l
											}), n.ns) {
											case 0:
												Qe.call(i, n);
												break;
											case 1:
												o.push(Ke.call(i, n, t, !1, !
												0));
												break;
											case 2:
												Xe.call(i, n);
												break;
											case 3:
												Ye.handleRosterMsg.call(i, n);
												break;
											case 4:
												i.registerConfrIQHandler && i
													.registerConfrIQHandler(n,
														t, i);
												break;
											case 5:
												at.call(i, n);
												break;
											default:
												x.error("distributeMeta", n)
										}
									}, i = this, a = 0; a < e.length; a++) n(a);
								return [4, Promise.all(o)];
							case 1:
								return s = l.sent(), (c = s.filter((function(
								e) {
									return e && "cmd" !== e.type
								}))).length > 0 && (null === (r = this
										.eventHandler) || void 0 === r || r
									.dispatch("onMessage", c)), [2]
						}
					}))
				}))
			}

			function Et(e, t) {
				gt.call(this, e, t)
			}

			function yt(e) {
				var t = this.root.lookup("easemob.pb.CommUnreadDL");
				t = t.decode(e.payload);
				var r = new(f())(t.timestamp.low, t.timestamp.high, t.timestamp.unsigned).toString();
				if (this.expirationTime && this.compareTokenExpireTime(Number(r), this.expirationTime),
					0 === t.unread.length) At.call(this);
				else {
					x.debug("pull unread message", t.unread);
					for (var o = 0; o < t.unread.length; o++) {
						var n = Pt(this._queues, t.unread[o].queue),
							i = Pt(this.unSyncQueue, t.unread[o].queue);
						n || i || this.unSyncQueue.push(t.unread[o].queue)
					}
					for (o = 0; o < this.unSyncQueue.length; o++) this.unSyncQueue[o].hasSync || Tt
						.call(this, this.unSyncQueue[o]), this.unSyncQueue[o].hasSync = !0
				}
				At.call(this)
			}

			function vt() {
				var e = [],
					t = this.root.lookup("easemob.pb.StatisticsBody"),
					r = t.decode(e);
				r.operation = 0, r = t.encode(r).finish();
				var o = this.root.lookup("easemob.pb.Meta").decode(e);
				o.id = (new Date).valueOf(), o.ns = 0, o.payload = r;
				var n = this.root.lookup("easemob.pb.CommSyncUL"),
					i = n.decode(e);
				i.meta = o, i = n.encode(i).finish();
				var a = this.root.lookup("easemob.pb.MSync"),
					s = a.decode(e);
				return s.version = this.version, s.encryptType = [0], s.command = 0, s.payload = i, a
					.encode(s).finish()
			}

			function _t(e) {
				var t = [],
					r = this.root.lookup("easemob.pb.CommSyncUL"),
					o = r.decode(t);
				o.queue = e, o = r.encode(o).finish();
				var n = this.root.lookup("easemob.pb.MSync"),
					i = n.decode(t);
				return i.version = this.version, i.encryptType = this.encryptType, i.command = 0, i
					.payload = o, n.encode(i).finish()
			}

			function Tt(e) {
				x.debug("sendBackqueue");
				var t = _t.call(this, e);
				zt.call(this, t)
			}

			function Rt(e, t) {
				var r = [],
					o = this.root.lookup("easemob.pb.CommSyncUL"),
					n = o.decode(r);
				n.queue = t, n.key = new(f())(e.low, e.high, e.unsigned).toString(), n = o.encode(n)
					.finish();
				var i = this.root.lookup("easemob.pb.MSync"),
					a = i.decode(r);
				return a.version = this.version, a.encryptType = this.encryptType, a.command = 0, a
					.payload = n, i.encode(a).finish()
			}

			function Ot() {
				var e;
				this.times = 1, this.autoReconnectNumTotal = 0, this.onOpened && this.onOpened(),
					null === (e = this.eventHandler) || void 0 === e || e.dispatch("onConnected"), Ct
					.call(this), Mt.call(this), Nt.call(this), At.call(this)
			}

			function It(e, t) {
				x.debug("sendLastSession", e);
				var r = Rt.call(this, e, t);
				zt.call(this, r)
			}

			function St(e) {
				var t, r, o, n, i, a, s, c = this,
					l = this.root.lookup("easemob.pb.Provision").decode(e.payload);
				if (this.context.jid && (this.context.jid.clientResource = l.resource), this
					.clientResource = l.resource, l.status.errorCode === it.OK) {
					if (this.disconnectedReason = void 0, l.authToken) {
						var u = JSON.parse(l.authToken).expires_in;
						if (!this.tokenExpiredTimer && !this.tokenWillExpireTimer) {
							var p = Date.now();
							this.expirationTime = u;
							var h = this.expirationTime - p;
							this.expiresIn = h < 0 ? 0 : h, this.tokenExpireTimeCountDown(this
								.expiresIn)
						}
					}
					this.reconnecting = !1, this.logOut = !1, "zfb" !== ht.platform && "dd" !== ht
						.platform || (this.sock.readyState = 1), this._localCache ? (null === (t = this
							._localCache) || void 0 === t ? void 0 : t.getInstance()) ? Ot.call(this) :
						this._localCache && new this._localCache({
							user: this.user,
							dbName: "cache_".concat(Math.abs(_e(this.appKey)), "_").concat(this
								.user),
							version: st,
							onInit: function() {
								return lt(c, void 0, void 0, (function() {
									return ut(this, (function(e) {
										return x.debug(
											"localCache init success"
											), Ot.call(this), [2]
									}))
								}))
							}
						}) : Ot.call(this)
				} else {
					var f = void 0,
						g = l.status,
						E = g.reason,
						y = g.errorCode;
					switch (x.debug("provision errorCode: ", y), x.debug("provision reason: ", E), y) {
						case it.FAIL:
							f = "Sorry, user register limit" === E ? m.create({
									type: d.MAX_LIMIT,
									message: "Sorry, the number of user registrations limit has been reached"
								}) : "Sorry, user register rate limit" === E ? m.create({
									type: d.MAX_LIMIT,
									message: "Sorry, user register rate limit"
								}) : "Sorry, token expired" === E ? m.create({
									type: d.WEBIM_TOKEN_EXPIRED,
									message: "Sorry, token expired"
								}) : "Sorry, token or password does not match login info" === E ? m
								.create({
									type: d.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,
									message: "INVALID_TOKEN"
								}) : "Sorry, user not found" === E ? m.create({
									type: d.USER_NOT_FOUND,
									message: "User not found"
								}) : m.create({
									type: d.WEBIM_CONNCTION_AUTH_ERROR,
									message: "Auth failed"
								}), null === (r = this.eventHandler) || void 0 === r || r.dispatch(
									"onError", f);
							break;
						case it.WRONG_PARAMETER:
							f = m.create({
								type: d.REQUEST_PARAMETER_ERROR,
								message: "Invalid parameter"
							}), null === (o = this.eventHandler) || void 0 === o || o.dispatch(
								"onError", f);
							break;
						case it.UNAUTHORIZED:
							f = m.create({
								type: d.WEBIM_CONNCTION_AUTH_ERROR,
								message: "Auth failed"
							}), null === (n = this.eventHandler) || void 0 === n || n.dispatch(
								"onError", f);
							break;
						case it.IM_FORBIDDEN:
							f = m.create({
								type: d.WEBIM_SERVER_SERVING_DISABLED,
								message: "Server serving disabled."
							}), null === (i = this.eventHandler) || void 0 === i || i.dispatch(
								"onError", f);
							break;
						case it.PERMISSION_DENIED:
							f = "Sorry, the app month live count limit" === E ? m.create({
								type: d.MAX_LIMIT,
								message: "Sorry, the monthly active user limit for this app has been reached"
							}) : "Sorry, the app day live count limit" === E ? m.create({
								type: d.MAX_LIMIT,
								message: "Sorry, the daily active user limit for this app has been reached"
							}) : "Sorry, the app online count limit" === E ? m.create({
								type: d.MAX_LIMIT,
								message: "Sorry, the maximum number limit of online users for this app has been reached"
							}) : m.create({
								type: d.WEBIM_CONNCTION_AUTH_ERROR,
								message: "Auth failed"
							}), null === (a = this.eventHandler) || void 0 === a || a.dispatch(
								"onError", f);
							break;
						default:
							f = m.create({
								type: d.WEBIM_CONNCTION_AUTH_ERROR,
								message: E
							}), null === (s = this.eventHandler) || void 0 === s || s.dispatch(
								"onError", f)
					}
					this.disconnectedReason = f
				}
			}

			function Ct() {
				var e, t;
				if ((null === (e = this.unMSyncSendMsgMap) || void 0 === e ? void 0 : e.size) > 0) {
					for (var r = Array.from(this.unMSyncSendMsgMap.keys()), o = 0; o < r.length; o++) {
						var n = this.unMSyncSendMsgMap.get(r[o]);
						zt.call(this, n, r[o])
					}
					null === (t = this.unMSyncSendMsgMap) || void 0 === t || t.clear()
				}
			}

			function At() {
				var e = vt.call(this);
				zt.call(this, e)
			}

			function Nt() {
				x.debug("sendUnreadDeal");
				var e = Ut.call(this);
				zt.call(this, e)
			}

			function Mt() {
				var e = this;
				bt.call(this), this.heartBeatID = setInterval((function() {
					(Date.now() - e.lastHeartbeat) / 1e3 >= 30 && (x.debug(
							"send heart beat"), Nt.call(e), e.lastHeartbeat = Date
					.now())
				}), this.heartBeatWait)
			}

			function bt() {
				clearInterval(this.heartBeatID)
			}

			function Ut() {
				var e = this.root.lookup("easemob.pb.MSync"),
					t = e.decode([]);
				return t.version = this.version, t.encryptType = this.encryptType, t.command = 1, e
					.encode(t).finish()
			}

			function Pt(e, t) {
				return e.some((function(e) {
					return e.name === t.name
				}))
			}

			function kt(e) {
				var t = this.root.lookup("easemob.pb.CommNotice"),
					r = t.decode(e.payload),
					o = Pt(this._queues, r.queue);
				x.debug("receive notice", t, this._queues);
				var n = Pt(this.unSyncQueue, r.queue);
				o || n || this.clientResource === r.queue.clientResource && r.queue.name === this
					.context.userId || (this._queues.push(r.queue), 1 === this._queues.length && Tt
						.call(this, r.queue))
			}

			function wt(e) {
				if ("string" == typeof e) {
					var t = JSON.parse(e);
					if (Array.isArray(t)) {
						var r = t[0],
							o = t[1];
						this.closeInfo = {
							code: r,
							reason: o
						}
					}
				}
			}

			function Lt(e) {
				return lt(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s, c;
					return ut(this, (function(l) {
						if (t = de.getEnvInfo(), r = this.root.lookup(
								"easemob.pb.MSync"), "miniCore" === this.name) {
							try {
								e.data instanceof ArrayBuffer || (x.debug(
											"received message: ".concat(e.data)
											), wt.call(this, e.data)), n =
									new Uint8Array(e.data), o = r.decode(n)
							} catch (e) {
								throw new Error("decode message fail.")
							}
							return [2, o]
						}
						if ("web" === t.platform || "zfb" === t.platform ||
							"dd" === t.platform) {
							for ('[401,"normal closed"]' === e.data && (x.debug(
										"received message: ".concat(e.data)), wt
									.call(this, e.data)), i = he().atob(e.data),
								a = [], s = 0, c = i.length; s < c; ++s) a.push(
								i.charCodeAt(s));
							return [2, r.decode(a)]
						}
						try {
							e.data instanceof ArrayBuffer || (x.debug(
									"received message: ".concat(e.data)), wt
								.call(this, e.data)), o = r.decode(e.data)
						} catch (e) {
							throw new Error("decode message fail.")
						}
						return [2, o]
					}))
				}))
			}

			function Dt(e) {
				var t = this;
				this.lastHeartbeat = Date.now(), e.then((function(e) {
					if (e) switch (e.command) {
						case 0:
							xt.call(t, e);
							break;
						case 1:
							yt.call(t, e);
							break;
						case 2:
							kt.call(t, e);
							break;
						case 3:
							St.call(t, e);
							break;
						default:
							x.error("unexpected msync command: ".concat(e.command))
					} else x.error("unexpected msync result: ".concat(e))
				}))
			}

			function xt(e) {
				var t, r, o, n, i, a, s, c, l, u, p, h, g, E, y, v, T, R, O, C, A, N, M, b, U, P, k, w,
					L, D, G, B, H, j, F, W, K, q, z, V, J, X, Y, Q, $;
				return lt(this, void 0, void 0, (function() {
					var Z, ee, te, re, oe, ne, ie, ae, se, ce, le, ue, pe, he, fe, me, ge,
						ye, ve, _e, Te, Re, Oe, Ie, Se, Ce, Ae, Ne, Me, be, Ue, Pe, ke, we,
						Le, De, xe, Ge, Be, He, je, Fe, We, qe = this;
					return ut(this, (function(ze) {
						switch (ze.label) {
							case 0:
								if (Z = (Z = this.root.lookup(
										"easemob.pb.CommSyncDL")).decode(e
										.payload), ee = new(f())(Z.serverId.low,
										Z.serverId.high, Z.serverId.unsigned)
									.toString(), te = new(f())(Z.metaId.low, Z
										.metaId.high, Z.metaId.unsigned)
									.toString(), !(Number(te) > 0)) return [3,
									23
								];
								if (!Z.status) return [3, 22];
								if (0 !== Z.status.errorCode) return [3, 21];
								if (null == (re = this._msgHash[te]) ? void 0 :
									re.isHandleChatroom) {
									try {
										oe = "join" === (null === (t = this
													._msgHash[te]) || void 0 ===
												t ? void 0 : t.operation), (
												null === (r = this._msgHash[
												te]) || void 0 === r ? void 0 :
												r.resolve
												) instanceof Function && oe &&
											this._msgHash[te].resolve({
												type: 0,
												data: {
													action: "apply",
													id: this._msgHash[te]
														.roomId,
													result: !0,
													user: this.context
														.userId
												}
											}), (null === (o = this._msgHash[
													te]) || void 0 === o ?
												void 0 : o.success
												) instanceof Function && oe &&
											this._msgHash[te].success({
												type: 0,
												data: {
													action: "apply",
													id: this._msgHash[te]
														.roomId,
													result: !0,
													user: this.context
														.userId
												}
											}), (null === (n = this._msgHash[
													te]) || void 0 === n ?
												void 0 : n.resolve
												) instanceof Function && !oe &&
											this._msgHash[te].resolve({
												type: 0,
												data: {
													result: !0
												}
											}), (null === (i = this._msgHash[
													te]) || void 0 === i ?
												void 0 : i.success
												) instanceof Function && !oe &&
											this._msgHash[te].success({
												type: 0,
												data: {
													result: !0
												}
											}), S.has(te) && (ne = S.get(te),
												Le = ne.rpt, De = ne
												.requestName, Le({
													isEndApi: !0,
													data: {
														isSuccess: 1,
														requestName: De,
														requestMethod: "WEBSOCKET",
														requestUrl: this
															.url,
														code: _.success
													}
												}), S.delete(te))
									} catch (e) {
										S.has(te) && (ie = S.get(te), Le = ie
												.rpt, De = ie.requestName, Le({
													isEndApi: !0,
													data: {
														isSuccess: 0,
														requestName: De,
														requestMethod: "WEBSOCKET",
														requestUrl: this
															.url,
														code: _.failed,
														codeDesc: "when executing success function error"
													}
												}), S.delete(te)), Ge = m
											.create({
												type: d
													.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,
												message: "when executing success function error",
												data: e
											}), this.onError && this.onError(
											Ge), null === (a = this
												.eventHandler) || void 0 ===
											a || a.dispatch("onError", Ge)
									}
									delete this._msgHash[te]
								}
								return !re || re.isHandleChatroom ? [3, 20] : (
									ae = null, se = "", ce = 0, le = null,
									this._msgHash[te].thirdMessage ? (this
										._msgHash[te].thirdMessage.id = Z
										.serverId, this._msgHash[te]
										.thirdMessage.timestamp = Z
										.timestamp, [4, Ke.call(this, this
											._msgHash[te].thirdMessage,
											Z.status, !0, !0)]) : [3, 2]);
							case 1:
								le = ze.sent(), ze.label = 2;
							case 2:
								if (0 === Z.metas.length) return [3, 13];
								ze.label = 3;
							case 3:
								switch (ze.trys.push([3, 12, , 13]), ue = Z
									.metas[0], pe = Z.status, ue.ns) {
									case 1:
										return [3, 4];
									case 5:
										return [3, 9]
								}
								return [3, 10];
							case 4:
								return this.useReplacedMessageContents ? [4, Ke
									.call(this, ue, pe, !0, !0)
								] : [3, 8];
							case 5:
								return le = ze.sent(), [4, null === (c =
										null === (s = this._localCache) ||
										void 0 === s ? void 0 : s
										.getInstance()) || void 0 === c ?
									void 0 : c.getMessageByServerMsgId(te)
								];
							case 6:
								return (he = ze.sent()) ? [4, null === (u =
										null === (l = this._localCache) ||
										void 0 === l ? void 0 : l
										.getInstance()) || void 0 === u ?
									void 0 : u.putMessageToDB(ct(ct(ct({},
										he), le), {
										id: te
									}))
								] : [3, 8];
							case 7:
								ze.sent(), ze.label = 8;
							case 8:
								return [3, 11];
							case 9:
								return (fe = de.parseNotify(Z.metas[0].payload))
									.edit_msg && (me = fe.edit_msg, ge = me
										.count, ye = me.operator, ve = me
										.edit_time, _e = me.sender, Te = me
										.send_time, ae = {
											operationTime: ve,
											operatorId: ye,
											operationCount: ge
										}, se = _e, ce = Number(Te)), [3, 11];
							case 10:
								return x.error("decode local meta error", ue), [
									3, 11
								];
							case 11:
								return [3, 13];
							case 12:
								return Re = ze.sent(), Ge = m.create({
										type: d.WEBIM_LOAD_MSG_ERROR,
										message: "decode local meta message error",
										data: Re
									}), this.onError && this.onError(Ge),
									null === (p = this.eventHandler) ||
									void 0 === p || p.dispatch("onError", Ge), [
										3, 13
									];
							case 13:
								I.has(te) && (I.get(te).rpt({
									isEndApi: !0,
									data: {
										isSuccess: 1,
										requestMethod: "WEBSOCKET",
										requestUrl: this.url,
										code: _.success,
										msgId: ee
									}
								}), I.delete(te)), ze.label = 14;
							case 14:
								return ze.trys.push([14, 18, , 19]), Oe = {
									localMsgId: te,
									serverMsgId: ee
								}, ae && (this._msgHash[te].modifiedInfo =
									ae, Ie = this._msgHash[te], Se = Ie
									.editMessageId, Pe = Ie.type, Ce = Ie
									.chatType, Ae = Ie.msg, Ne = Ie.to, Me =
									Ie.translations, be = {
										id: Se,
										type: Pe,
										chatType: Ce,
										msg: Ae,
										modifiedInfo: ae,
										to: Ne,
										from: se,
										time: Number(ce)
									}, Me && (be.translations = Me), Oe
									.message = be, null === (E = null === (
											g = null === (h = this
												._localCache) || void 0 ===
											h ? void 0 : h.getInstance()) ||
										void 0 === g ? void 0 : g
										.getMessageByServerMsgId(Se)) ||
									void 0 === E || E.then((function(e) {
										var t, r;
										e && "txt" === e.type && (
											null === (r =
												null === (t = qe
													._localCache
													) ||
												void 0 === t ?
												void 0 : t
												.getInstance()
												) || void 0 ===
											r || r
											.putMessageToDB(ct(
												ct({}, e), {
													msg: be
														.msg,
													modifiedInfo: be
														.modifiedInfo,
													translations: be
														.translations
												})))
									}))), le && (Oe.message = le), [4,
									null === (v = null === (y = this
											._localCache) || void 0 === y ?
										void 0 : y.getInstance()) ||
									void 0 === v ? void 0 : v
									.updateLocalMessage(te, {
										serverMsgId: ee,
										status: Ee.SUCCESS
									})
								];
							case 15:
								return ze.sent(), (null === (T = this._msgHash[
										te]) || void 0 === T ? void 0 : T
									.success) instanceof Function ? [4, this
									._msgHash[te].success(te, ee)
								] : [3, 17];
							case 16:
								ze.sent(), ze.label = 17;
							case 17:
								return (null === (R = this._msgHash[te]) ||
										void 0 === R ? void 0 : R.resolve
										) instanceof Function && this._msgHash[
										te].resolve(Oe), [3, 19];
							case 18:
								return Ue = ze.sent(), Ge = m.create({
										type: d
											.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,
										message: "when executing success function error",
										data: Ue
									}), this.onError && this.onError(Ge),
									null === (O = this.eventHandler) ||
									void 0 === O || O.dispatch("onError", Ge), [
										3, 19
									];
							case 19:
								this.onReceivedMessage && this
									.onReceivedMessage({
										id: te,
										mid: ee,
										to: this._msgHash[te].to,
										time: 0
									}), null === (C = this.eventHandler) ||
									void 0 === C || C.dispatch(
										"onReceivedMessage", {
											id: te,
											mid: ee,
											to: this._msgHash[te].to
										}), delete this._msgHash[te], ze.label =
									20;
							case 20:
								return [3, 22];
							case 21:
								if (15 === Z.status.errorCode)(null === (A =
											this._msgHash[te]) || void 0 === A ?
										void 0 : A.fail) instanceof Function &&
									this._msgHash[te].fail({
										type: d
											.SERVICE_NOT_ALLOW_MESSAGING_MUTE,
										reason: "you were muted"
									}), this._msgHash[te]
									.reject instanceof Function && this
									._msgHash[te].reject({
										type: d
											.SERVICE_NOT_ALLOW_MESSAGING_MUTE,
										reason: "you were muted"
									}), null === (M = null === (N = this
											._localCache) || void 0 === N ?
										void 0 : N.getInstance()) || void 0 ===
									M || M.updateLocalMessage(te, {
										serverMsgId: ee,
										status: Ee.FAIL
									});
								else if (1 === Z.status.errorCode) {
									switch (Pe = void 0, Z.status.reason) {
										case "blocked":
											Pe = d.PERMISSION_DENIED;
											break;
										case "group not found":
											Pe = d.GROUP_NOT_EXIST;
											break;
										case "not in group or chatroom":
											Pe = d.GROUP_NOT_JOINED;
											break;
										case "exceed recall time limit":
											Pe = d.MESSAGE_RECALL_TIME_LIMIT;
											break;
										case "message recall disabled":
											Pe = d.SERVICE_NOT_ENABLED;
											break;
										case "not in group or chatroom white list":
											Pe = d.SERVICE_NOT_ALLOW_MESSAGING;
											break;
										case "nonroster":
											Pe = d.USER_NOT_FRIEND, Z.status
												.reason = "not contact";
											break;
										case "group is disabled":
											Pe = d.GROUP_IS_DISABLED, Z.status
												.reason = "group is disabled";
											break;
										case "limit directed users":
											Pe = d.MAX_LIMIT;
											break;
										case "Sorry, edit limit reached":
											Pe = d.MAX_LIMIT, Z.status.reason =
												"Modify message limit reached";
											break;
										case "Sorry, message does not exist":
											Pe = d.MODIFY_MESSAGE_NOT_EXIST, Z
												.status.reason =
												"The message does not exist.";
											break;
										case "Sorry, You do not have permission":
											Pe = d.PERMISSION_DENIED, Z.status
												.reason =
												"You do not have the modified permission.";
											break;
										case "Sorry, format is incorrect":
											Pe = d.MODIFY_MESSAGE_FORMAT_ERROR,
												Z.status.reason =
												"The modify messaged format error.";
											break;
										case "Sorry, edit is not available":
											Pe = d.SERVICE_NOT_ENABLED, Z.status
												.reason =
												"The message modify function is not activated.";
											break;
										case "Sorry, edit fail":
											Pe = d.MODIFY_MESSAGE_FAILED, Z
												.status.reason =
												"Modify message failed.";
											break;
										default:
											Z.status.reason.includes("grpID") &&
												Z.status.reason.includes(
													"does not exist!") ? (Pe = d
													.CHATROOM_NOT_EXIST, Z
													.status.reason =
													"The chat room dose not exist."
													) : Z.status.reason
												.includes("username") && Z
												.status.reason.includes(
													"doesn't exist!") ? Pe = d
												.USER_NOT_FOUND :
												"group member list is full!" ===
												Z.status.reason ? Pe = d
												.CHATROOM_MEMBERS_FULL : Z
												.status.reason.includes(
													"can not join this group"
													) && Z.status.reason
												.includes(
												"is in the blacklist") ? (Pe = d
													.PERMISSION_DENIED, Z.status
													.reason =
													"permission denied") :
												"can not operate this group, reason: group is disabled" ===
												Z.status.reason ? Pe = d
												.GROUP_IS_DISABLED : Z.status
												.reason.includes("moderation") ?
												Pe = d
												.MESSAGE_MODERATION_BLOCKED : Z
												.status.reason.includes(
													"group ID illegal, please check it"
													) ? (Pe = d
													.REQUEST_PARAMETER_ERROR, Z
													.status.reason =
													"Invalid parameter") : Pe =
												Z.status.reason.includes(
													"has create too many chatrooms"
													) || Z.status.reason
												.includes(
													"has joined too many chatrooms"
													) ? d.MAX_LIMIT : Z.status
												.reason.includes(
													"auto create failed") ? d
												.SERVER_BUSY : d
												.SERVER_UNKNOWN_ERROR
									}
									this._msgHash[te] && ((null === (b = this
												._msgHash[te]) || void 0 ===
											b ? void 0 : b.isHandleChatroom
											) ? (xe = m.create({
												type: Pe,
												message: Z.status
													.reason || "",
												data: ""
											}), this._msgHash[te]
											.reject instanceof Function &&
											this._msgHash[te].reject(xe),
											this._msgHash[te]
											.error instanceof Function &&
											this._msgHash[te].error(xe), S
											.has(te) && (ke = _.failed,
												Pe === d
												.CHATROOM_NOT_EXIST ? ke = _
												.notFound : Pe === d
												.CHATROOM_MEMBERS_FULL && (
													ke = _.reachLimit), we =
												S.get(te), Le = we.rpt, De =
												we.requestName, Le({
													isEndApi: !0,
													data: {
														isSuccess: 0,
														requestName: De,
														requestMethod: "WEBSOCKET",
														requestUrl: this
															.url,
														code: ke,
														codeDesc: Z
															.status
															.reason
													}
												}), S.delete(te))) : (xe = m
											.create({
												type: Pe,
												message: Z.status
													.reason || "",
												data: {
													id: te,
													mid: ee
												}
											}), this._msgHash[te]
											.reject instanceof Function &&
											this._msgHash[te].reject(xe),
											this._msgHash[te]
											.fail instanceof Function &&
											this._msgHash[te].fail({
												type: Pe,
												reason: Z.status
													.reason ? Z.status
													.reason : "",
												data: {
													id: te,
													mid: ee
												}
											}), null === (P = null === (U =
													this._localCache) ||
												void 0 === U ? void 0 : U
												.getInstance()) ||
											void 0 === P || P
											.updateLocalMessage(te, {
												serverMsgId: ee,
												status: Ee.FAIL
											})), delete this._msgHash[te])
								} else if (7 === Z.status.errorCode)
									"sensitive words" === Z.status.reason &&
									this._msgHash[te] ? (xe = m.create({
											type: d
												.MESSAGE_INCLUDE_ILLEGAL_CONTENT,
											message: "sensitive words",
											data: {
												id: te,
												mid: ee
											}
										}), this._msgHash[te]
										.reject instanceof Function && this
										._msgHash[te].reject(xe), this._msgHash[
											te].fail instanceof Function && this
										._msgHash[te].fail({
											type: d
												.MESSAGE_INCLUDE_ILLEGAL_CONTENT,
											data: {
												id: te,
												mid: ee,
												reason: "sensitive words"
											}
										}), null === (w = null === (k = this
												._localCache) || void 0 === k ?
											void 0 : k.getInstance()) ||
										void 0 === w || w.updateLocalMessage(
										te, {
											serverMsgId: ee,
											status: Ee.FAIL
										})) : "blocked by mod_antispam" === Z
									.status.reason && this._msgHash[te] ? (xe =
										m.create({
											type: d
												.MESSAGE_INCLUDE_ILLEGAL_CONTENT,
											message: "blocked by mod_antispam",
											data: {
												id: te,
												mid: ee
											}
										}), this._msgHash[te]
										.reject instanceof Function && this
										._msgHash[te].reject(xe), this._msgHash[
											te].fail instanceof Function && this
										._msgHash[te].fail({
											type: d
												.MESSAGE_INCLUDE_ILLEGAL_CONTENT,
											data: {
												id: te,
												mid: ee,
												reason: "blocked by mod_antispam"
											}
										}), null === (D = null === (L = this
												._localCache) || void 0 === L ?
											void 0 : L.getInstance()) ||
										void 0 === D || D.updateLocalMessage(
										te, {
											serverMsgId: ee,
											status: Ee.FAIL
										})) : "user is mute" === Z.status
									.reason && this._msgHash[te] ? (xe = m
										.create({
											type: d.USER_MUTED_BY_ADMIN,
											message: "user is mute",
											data: {
												id: te,
												mid: ee
											}
										}), this._msgHash[te]
										.reject instanceof Function && this
										._msgHash[te].reject(xe), this._msgHash[
											te].fail instanceof Function && this
										._msgHash[te].fail(xe), null === (B =
											null === (G = this._localCache) ||
											void 0 === G ? void 0 : G
											.getInstance()) || void 0 === B || B
										.updateLocalMessage(te, {
											serverMsgId: ee,
											status: Ee.FAIL
										})) : "traffic limit" === Z.status
									.reason && this._msgHash[te] ? (xe = m
										.create({
											type: d
												.MESSAGE_CURRENT_LIMITING,
											message: "traffic limit",
											data: {
												id: te,
												mid: ee
											}
										}), this._msgHash[te]
										.reject instanceof Function && this
										._msgHash[te].reject(xe), this._msgHash[
											te].fail instanceof Function && this
										._msgHash[te].fail(xe), null === (j =
											null === (H = this._localCache) ||
											void 0 === H ? void 0 : H
											.getInstance()) || void 0 === j || j
										.updateLocalMessage(te, {
											serverMsgId: ee,
											status: Ee.FAIL
										})) : "Sorry, data is too large" === Z
									.status.reason && this._msgHash[te] && (xe =
										m.create({
											type: d.MESSAGE_SIZE_LIMIT,
											message: "Sorry, data is too large",
											data: {
												id: te,
												mid: ee
											}
										}), this._msgHash[te]
										.reject instanceof Function && this
										._msgHash[te].reject(xe), this._msgHash[
											te].fail instanceof Function && this
										._msgHash[te].fail(xe), null === (W =
											null === (F = this._localCache) ||
											void 0 === F ? void 0 : F
											.getInstance()) || void 0 === W || W
										.updateLocalMessage(te, {
											serverMsgId: ee,
											status: Ee.FAIL
										}));
								else if (19 === Z.status.errorCode) this
									._msgHash[te] && (I.has(te) && (I.get(te)
											.rpt({
												isEndApi: !0,
												data: {
													isSuccess: 0,
													requestMethod: "WEBSOCKET",
													requestUrl: this.url,
													code: d
														.MESSAGE_EXTERNAL_LOGIC_BLOCKED,
													codeDesc: Z.status
														.reason || "",
													msgId: ee
												}
											}), I.delete(te)), xe = m.create({
											type: d
												.MESSAGE_EXTERNAL_LOGIC_BLOCKED,
											message: Z.status.reason || "",
											data: {
												id: te,
												mid: ee
											}
										}), this._msgHash[te]
										.reject instanceof Function && this
										._msgHash[te].reject(xe), this._msgHash[
											te].fail instanceof Function && this
										._msgHash[te].fail({
											type: d
												.MESSAGE_EXTERNAL_LOGIC_BLOCKED,
											data: {
												id: te,
												mid: ee,
												reason: Z.status.reason
											}
										}), null === (q = null === (K = this
												._localCache) || void 0 === K ?
											void 0 : K.getInstance()) ||
										void 0 === q || q.updateLocalMessage(
										te, {
											serverMsgId: ee,
											status: Ee.FAIL
										}));
								else if (this._msgHash[te]) {
									I.has(te) && (I.get(te).rpt({
										isEndApi: !0,
										data: {
											isSuccess: 0,
											requestMethod: "WEBSOCKET",
											requestUrl: this.url,
											code: d
												.WEBIM_LOAD_MSG_ERROR,
											codeDesc: (null === (z =
													Z.status) ||
												void 0 === z ?
												void 0 : z
												.reason) || "",
											msgId: ee
										}
									}), I.delete(te));
									try {
										xe = m.create({
												type: d
													.WEBIM_LOAD_MSG_ERROR,
												message: (null === (V = Z
															.status) ||
														void 0 === V ?
														void 0 : V.reason
														) || "",
												data: {
													id: te,
													mid: ee,
													reason: Z.status && Z
														.status.reason
												}
											}), this._msgHash[te]
											.reject instanceof Function && this
											._msgHash[te].reject(xe), null === (
												X = null === (J = this
													._localCache) || void 0 ===
												J ? void 0 : J.getInstance()) ||
											void 0 === X || X
											.updateLocalMessage(te, {
												serverMsgId: ee,
												status: Ee.FAIL
											}), this._msgHash[te]
											.fail instanceof Function && this
											._msgHash[te].fail({
												type: d
													.WEBIM_LOAD_MSG_ERROR,
												data: {
													errorCode: Z.status && Z
														.status.errorCode,
													reason: Z.status && Z
														.status.reason
												}
											})
									} catch (e) {
										Ge = m.create({
												type: d
													.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,
												message: "when executing fail function error",
												data: e
											}), this.onError && this.onError(
											Ge), null === (Y = this
												.eventHandler) || void 0 ===
											Y || Y.dispatch("onError", Ge)
									}
									delete this._msgHash[te]
								} else I.has(te) && (I.get(te).rpt({
										isEndApi: !0,
										data: {
											isSuccess: 0,
											requestMethod: "WEBSOCKET",
											requestUrl: this.url,
											code: d
												.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,
											codeDesc: "on message error",
											msgId: ee
										}
									}), I.delete(te)), Ge = m.create({
										type: d
											.WEBIM_CONNCTION_CALLBACK_INNER_ERROR,
										message: "on message error"
									}), this.onError && this.onError(Ge),
									null === (Q = this.eventHandler) ||
									void 0 === Q || Q.dispatch("onError", Ge);
								ze.label = 22;
							case 22:
								return [2];
							case 23:
								if (Z.metas && 0 !== Z.metas.length) try {
									Et.call(this, Z.metas, Z.status)
								} catch (e) {
									Ge = m.create({
											type: d
												.WEBIM_LOAD_MSG_ERROR,
											message: "decode message error",
											data: e
										}), this.onError && this.onError(
										Ge), null === ($ = this
											.eventHandler) || void 0 ===
										$ || $.dispatch("onError", Ge)
								} finally {
									Z.isLast ? (x.debug(
											"metas & CommSyncDLMessage.isLast",
											Z.isLast), Be = -1, this
										._queues.some((function(e, t) {
											return e.name === Z
												.name && (Be =
													t, !0)
										})) && Be > 0 && this._queues
										.splice(Be, 1), this._queues
										.length > 0 && Tt.call(this,
											this._queues[0]), He = -1,
										this.unSyncQueue.some((function(
											e, t) {
											return e.name === Z
												.queue.name && (
													He = t, !0)
										})) && this.unSyncQueue.splice(
											He, 1)) : Z.nextKey && (je =
										new(f())(Z.nextKey.low, Z
											.nextKey.high, Z.nextKey
											.unsigned).toString(), x
										.debug("nexKey:", je,
											"this.nextKey:", this.nexKey
											), je !== this.nexKey && (
											this.nexKey = je, It.call(
												this, Z.nextKey, Z.queue
												)))
								} else Z.isLast && (x.debug(
										"CommSyncDLMessage.isLast", Z
										.isLast), Fe = -1, this._queues
									.some((function(e, t) {
										return e.name === Z
											.queue.name && (Fe =
												t, !0)
									})) && this._queues.splice(Fe, 1),
									this._queues.length > 0 && Tt.call(
										this, this._queues[0]), We = -1,
									this.unSyncQueue.some((function(e,
										t) {
										return e.name === Z
											.queue.name && (We =
												t, !0)
									})) && this.unSyncQueue.splice(We,
										1));
								return [2]
						}
					}))
				}))
			}

			function Gt(e) {
				var t = [],
					r = this.root.lookup("easemob.pb.KeyValue"),
					o = [];
				for (var n in e) {
					var i = r.decode(t);
					i.key = n, void 0 !== e[n] && ("object" == typeof e[n] ? (i.type = 8, i
							.stringValue = JSON.stringify(e[n])) : "string" == typeof e[n] ? (i
							.type = 7, i.stringValue = e[n]) : "boolean" == typeof e[n] ? (i.type =
							1, i.varintValue = !0 === e[n] ? 1 : 0) : Number.isInteger(e[n]) ? (i
							.type = 2, i.varintValue = e[n]) : (i.type = 6, i.doubleValue = e[n]), o
						.push(i))
				}
				return o
			}

			function Bt(e) {
				var t, r, o, n = [];
				if (this.root) {
					var i, a = this.root.lookup("easemob.pb.MessageBody.Content").decode(n);
					switch (i = !e.group && "groupchat" !== (null === (t = null == e ? void 0 : e
							.chatType) || void 0 === t ? void 0 : t.toLowerCase()) || e.roomType ? e
						.group && e.roomType || "chatroom" === (null === (r = null == e ? void 0 : e
							.chatType) || void 0 === r ? void 0 : r.toLowerCase()) ? "chatRoom" :
						"singleChat" : "groupChat", e.type) {
						case "txt":
							a.type = 0, a.text = e.msg;
							break;
						case "img":
							a.type = 1, e.body ? (a.displayName = e.body.filename, a.remotePath = e.body
								.url, a.secretKey = e.body.secret, a.fileLength = e.body
								.file_length, a.size = e.body.size, a.thumbnailDisplayName = e.body
								.filename) : e.file ? (a.displayName = e.file.filename, a
								.remotePath = e.file.url, a.secretKey = e.file.secret, a
								.fileLength = e.file.file_length, a.size = e.file.size, a
								.thumbnailDisplayName = e.file.filename) : (a.displayName = e
								.filename, a.remotePath = e.url, a.secretKey = e.secret, a
								.fileLength = e.file_length, a.size = e.size, a
								.thumbnailDisplayName = e.filename), e.isBuildCombinedMsg && (a
								.remotePath = e.url, a.secretKey = e.secret, a.size = {
									height: e.height,
									width: e.width
								});
							break;
						case "video":
							a.type = 2, e.body ? (a.displayName = e.body.filename, a.remotePath = e.body
								.url, a.secretKey = e.body.secret, a.fileLength = e.body
								.file_length, a.duration = e.body.length, a.thumbnailDisplayName = e
								.body.filename, a.thumbnailRemotePath = this.useOwnUploadFun ? "" :
								"".concat(e.body.url, "?vframe=true"), a.thumbnailSecretKey = this
								.useOwnUploadFun ? "" : e.body.secret) : e.isBuildCombinedMsg && (a
								.displayName = e.filename, a.remotePath = e.url, a.secretKey = e
								.secret, a.fileLength = e.file_length, a.duration = e.length, a
								.thumbnailDisplayName = e.filename, a.thumbnailRemotePath = e.thumb,
								a.thumbnailSecretKey = e.thumb_secret);
							break;
						case "loc":
							a.type = 3, a.latitude = e.lat, a.longitude = e.lng, a.address = e.addr, a
								.buildingName = e.buildingName, a.latitude = e.lat;
							break;
						case "audio":
							a.type = 4, e.body ? (a.displayName = e.body.filename, a.remotePath = e.body
								.url, a.secretKey = e.body.secret, a.fileLength = e.body
								.file_length, a.duration = e.body.length, a.thumbnailDisplayName = e
								.body.filename) : e.isBuildCombinedMsg && (a.displayName = e
								.filename, a.remotePath = e.url, a.secretKey = e.secret, a
								.fileLength = e.file_length, a.duration = e.length, a
								.thumbnailDisplayName = e.filename);
							break;
						case "file":
							a.type = 5, e.body ? (a.displayName = e.body.filename, a.remotePath = e.body
									.url, a.secretKey = e.body.secret, a.fileLength = e.body
									.file_length, a.thumbnailDisplayName = e.body.filename) : e
								.isBuildCombinedMsg && (a.displayName = e.filename, a.remotePath = e
									.url, a.secretKey = e.secret, a.fileLength = e.file_length, a
									.thumbnailDisplayName = e.filename);
							break;
						case "cmd":
							a.type = 6, a.action = e.action;
							break;
						case "custom":
							a.type = 7, a.customEvent = e.customEvent, a.customExts = Gt.call(this, e
								.customExts);
							break;
						case "combine":
							a.type = 0, a.subType = 0, a.text = e.compatibleText, a.displayName = e
								.filename, a.remotePath = e.url, a.secretKey = e.secret, a.fileLength =
								e.file_length, a.title = e.title, a.summary = e.summary, a
								.combineLevel = e.combineLevel
					}
					var s = [];
					e.ext && (s = Gt.call(this, e.ext));
					var c = this.root.lookup("easemob.pb.MessageBody"),
						l = c.decode(n),
						u = e.from || this.context.jid.name;
					l.from = {
						name: e.isBuildCombinedMsg ? u : this.context.jid.name
					};
					var p = e.to.indexOf("/"),
						h = p > -1 ? e.to.substring(0, p) : e.to;
					if (l.to = {
							name: h
						}, "channel" === e.type) l.type = nt.CHANNEL_ACK;
					else if ("recall" === e.type) l.type = nt.RECALL, l.ackMessageId = e.ackId;
					else if ("delivery" === e.type) l.type = nt.DELIVER_ACK, l.ackMessageId = e.ackId;
					else if ("read" === e.type) l.type = nt.READ_ACK, l.ackMessageId = e.ackId,
						"groupChat" === i && (l.msgConfig = {
							allowGroupAck: !0
						}, l.ackContent = e.ackContent);
					else if ("chatRoom" === i) l.type = nt.CHATROOM;
					else if ("groupChat" === i) {
						if (l.type = nt.GROUPCHAT, e.msgConfig) {
							var m = e.msgConfig.allowGroupAck;
							l.msgConfig = {
								allowGroupAck: !!m
							}
						}
					} else "singleChat" === i && (l.type = nt.SINGLECHAT);
					e.editMessageId && (l.type = nt.EDIT, l.editMessageId = e.editMessageId), l
						.contents = [a], l.ext = s;
					var g = function(e) {
						var t = {};
						return "translations" in e && (t.translations = e.translations),
							"isChatThread" in e && e.isChatThread && (t.thread = {}), Object.keys(t)
							.length > 0 ? JSON.stringify(t) : ""
					}(e);
					g && (l.meta = g), l = c.encode(l).finish();
					var E = this.root.lookup("easemob.pb.Meta"),
						y = E.decode(n);
					y.id = e.id;
					var v = "easemob.com";
					if ("chatRoom" !== i && "groupChat" !== i || (v = "conference.easemob.com"), y
						.to = {
							appKey: this.appKey,
							name: h,
							domain: v
						}, p > -1 && (y.to.clientResource = e.to.substring(p + 1, e.to.length)),
						"chatRoom" === i && (y.ext = Gt.call(this, function(e) {
							return {
								chatroom_msg_tag: "high" === e.priority ? 0 : "low" === e
									.priority ? 2 : 1
							}
						}(e))), "recall" === e.type && e.metaExt && (y.ext = Gt.call(this, {
							recallMessageExtensionInfo: e.metaExt
						})), y.ns = 1, y.payload = l, y.routetype = e.deliverOnlineOnly ? 1 : 0,
						"singleChat" !== i && Array.isArray(e.receiverList) && (null === (o = e
							.receiverList) || void 0 === o ? void 0 : o.length) > 0 && (y
							.directedUsers = e.receiverList, y.routetype = 2), e.isBuildCombinedMsg)
						return y.timestamp = f().fromValue(e.time), E.encode(y).finish();
					var _ = this.root.lookup("easemob.pb.CommSyncUL"),
						T = _.decode(n);
					T.meta = y, jt.call(this, e, y), T = _.encode(T).finish();
					var R = this.root.lookup("easemob.pb.MSync"),
						O = R.decode(n);
					return O.version = this.version, O.encryptType = this.encryptType, O.command = 0, O
						.payload = T, R.encode(O).finish()
				}
				e.fail && e.fail({
					type: d.WEBIM_CONNCTION_CLIENT_OFFLINE,
					message: "Not logged in"
				})
			}

			function Ht(e) {
				var t, r, o = this,
					n = ct({}, e);
				if (e.file) return n.accessToken = this.token, n.appKey = this.appKey, n.apiUrl = this
					.apiUrl, n.body && n.body.url ? Bt.call(this, n) : new Promise((function(t, r) {
						var i = n.onFileUploadComplete;
						n.onFileUploadComplete = function(t) {
							var r, a, s, c, l, u;
							if (t.entities[0]["file-metadata"]) {
								var d = t.entities[0]["file-metadata"][
								"content-length"];
								n.file_length = d, n.filetype = t.entities[0][
									"file-metadata"
								]["content-type"], d > 204800 && (n.thumbnail = !0)
							}
							var p = "".concat(o.apiUrl, "/").concat(o.orgName, "/")
								.concat(o.appName, "/chatfiles/").concat(t.entities[0]
									.uuid);
							n.body = {
									type: n.type || "file",
									secret: t.entities[0]["share-secret"],
									filename: n.file.filename || n.filename,
									url: p,
									length: n.length || 0,
									filetype: n.filetype || n.file.filetype,
									file_length: (null === (a = null === (r = n.file) ||
											void 0 === r ? void 0 : r.data) ||
										void 0 === a ? void 0 : a.size) || 0,
									size: {
										width: n.width || 0,
										height: n.height || 0
									}
								}, n.file.url = t.uri, e.secret = t.entities[0][
									"share-secret"
								], t.url = e.url = "".concat(p,
									"?em-redirect=true&share-secret=").concat(t
									.entities[0]["share-secret"]), e.file_length = n
								.file_length = (null === (c = null === (s = n.file) ||
										void 0 === s ? void 0 : s.data) || void 0 ===
									c ? void 0 : c.size) || 0, "img" === n.type && (e
									.thumb = "".concat(e.url, "&thumbnail=true"), t
									.thumb = "".concat(t.url, "&thumbnail=true")),
								"video" === n.type && (e.thumb = "".concat(e.url,
									"&vframe=true"), e.thumb_secret = t.entities[0][
									"share-secret"
								], t.thumb = "".concat(t.url, "&vframe=true")),
								i instanceof Function && i(t, n.id);
							var h = Bt.call(o, n);
							I.size <= C && I.set(n.id, {
									rpt: o.dataReport.geOperateFun({
										operationName: E.SEND_MSG
									})
								}), null === (u = null === (l = o._localCache) ||
									void 0 === l ? void 0 : l.getInstance()) ||
								void 0 === u || u.storeMessage(e, Ee.INPROGRESS), zt
								.call(o, h)
						}, de.uploadFile.call(o, n, E.UPLOAD_MSG_ATTACH)
					}));
				if ("combine" === e.type) {
					n.accessToken = this.token, n.appKey = this.appKey, n.apiUrl = this.apiUrl;
					var i = n.onFileUploadComplete,
						a = n.onFileUploadError;
					return new Promise((function(t, r) {
						var s, c, l, u;
						if ((null === (s = e.messageList) || void 0 === s ? void 0 : s
								.length) > 300 || 0 === (null === (c = e.messageList) ||
								void 0 === c ? void 0 : c.length)) return o._msgHash[n.id]
							.reject({
								type: d.MAX_LIMIT,
								message: "The number of combined messages exceeded the limit."
							});
						var p = dt([], e.messageList, !0),
							h = 0;
						if (p.forEach((function(e) {
								(null == e ? void 0 : e.combineLevel) > h && (h =
									null == e ? void 0 : e.combineLevel)
							})), n.combineLevel = h + 1, n.combineLevel > 10) return o
							._msgHash[n.id].reject({
								type: d.MAX_LIMIT,
								message: "The level of the merged message exceeded the limit."
							});
						var f = Ft.call(o, p),
							m = function(t, r) {
								var a, s, c, l, u, d, p = "".concat(o.apiUrl, "/").concat(o
										.orgName, "/").concat(o.appName, "/chatfiles/")
									.concat(t.entities[0].uuid),
									h = null === (a = t.entities[0]) || void 0 === a ?
									void 0 : a["share-secret"],
									f = p + "?em-redirect=true";
								h && (f = "".concat(f, "&share-secret=").concat(h)),
									i instanceof Function && i({
										url: f,
										secret: h
									}), e.url = f, e.secret = h, n.url = f, n.secret = t
									.entities[0]["share-secret"], n.filename = (null === (
											s = n.file) || void 0 === s ? void 0 : s
										.filename) || (null == r ? void 0 : r.fileName), n
									.file_length = (null === (l = null === (c = n.file) ||
											void 0 === c ? void 0 : c.data) || void 0 ===
										l ? void 0 : l.size) || (null == r ? void 0 : r
										.fileLength) || 0, null === (d = null === (u = o
											._localCache) || void 0 === u ? void 0 : u
										.getInstance()) || void 0 === d || d.storeMessage(e,
										Ee.INPROGRESS);
								var m = Bt.call(o, n);
								zt.call(o, m)
							},
							g = de.getEnvInfo();
						if ("web" !== g.platform && "node" !== g.platform && "quick_app" !==
							g.platform && (null === (u = null === (l = g.global) ||
									void 0 === l ? void 0 : l.canIUse) || void 0 === u ?
								void 0 : u.call(l, "getFileSystemManager"))) {
							var y = g.global.getFileSystemManager(),
								v = "".concat(o.apiUrl, "/").concat(o.orgName, "/").concat(o
									.appName, "/chatfiles");
							y.writeFile({
								filePath: "".concat(g.global.env.USER_DATA_PATH,
									"/combine"),
								data: f.buffer,
								encoding: "binary",
								success: function(e) {
									g.global.uploadFile({
										url: v,
										filePath: "".concat(g.global.env
											.USER_DATA_PATH,
											"/combine"),
										name: "file",
										header: {
											"Content-Type": "multipart/form-data",
											Authorization: "Bearer " + n
												.accessToken
										},
										success: function(e) {
											if (200 === e
												.statusCode) {
												x.debug("upload success",
													e);
												var t = JSON.parse(e
													.data);
												m(t, {
													fileName: "combine",
													fileLength: f
														.length
												})
											} else x.debug(
													"upload fail"),
												n
												.onFileUploadError instanceof Function &&
												n.onFileUploadError(
													e), this
												._msgHash[n.id]
												.reject({
													type: d
														.WEBIM_UPLOADFILE_ERROR,
													message: "Failed to upload the merge message.Please try again",
													data: e
												})
										},
										fail: function(t) {
											x.debug("upload fail"),
												n
												.onFileUploadError instanceof Function &&
												n.onFileUploadError(
													e), this
												._msgHash[n.id]
												.reject({
													type: d
														.WEBIM_UPLOADFILE_ERROR,
													message: "Failed to upload the merge message.Please try again",
													data: t
												})
										}
									})
								},
								fail: function(e) {
									x.debug("write file fail", e), this
										._msgHash[n.id].reject({
											type: d.WEBIM_UPLOADFILE_ERROR,
											message: "Failed to upload the merge message.Please try again",
											data: e
										})
								}
							})
						} else {
							var _ = new File([f], "combine", {
									type: "application/octet-stream"
								}),
								T = {
									url: URL.createObjectURL(_),
									filename: n.id,
									data: _
								};
							n.file = T, n.onFileUploadComplete = function(e) {
								m(e)
							}, n.onFileUploadError = function(e) {
								a instanceof Function && a(e), o._msgHash[n.id].reject({
									type: d.WEBIM_UPLOADFILE_ERROR,
									message: "Failed to upload the merge message.Please try again",
									data: e
								})
							}, de.uploadFile.call(o, n, E.UPLOAD_MSG_ATTACH)
						}
					}))
				}
				"img" === e.type && (n.body || (n.body = ct(ct({}, n), {
					size: {
						width: n.width || 0,
						height: n.height || 0
					}
				}))), null === (r = null === (t = this._localCache) || void 0 === t ? void 0 : t
					.getInstance()) || void 0 === r || r.storeMessage(e, Ee.INPROGRESS);
				var s = Bt.call(this, n);
				zt.call(this, s)
			}

			function jt(e, t) {
				e.editMessageId || pt.includes(e.type) && (this._msgHash[e.id].thirdMessage = t)
			}

			function Ft(e) {
				for (var t = Uint8Array.from("cm", (function(e) {
						return e.charCodeAt(0)
					})), r = 0; r < e.length; r++) {
					for (var o = e[r], n = ct(ct({}, o), {
								isBuildCombinedMsg: !0
							}), i = this.mSync.encodeChatMsg.call(this, n), a = i.length, s =
							new Uint8Array(4), c = 0; c < 4; c++) s[c] = a >> 8 * (3 - c) & 255;
					x.debug("message length:", s);
					var l = new Uint8Array(t.length + s.length + i.length);
					l.set(t), l.set(s, t.length), l.set(i, t.length + s.length), t = l
				}
				var u = new Uint8Array(t.length + 1),
					d = 0;
				for (r = 2; r < t.length; r++) r % 2 == 1 && (d ^= t[r]);
				return u.set(t), x.debug("checkResult:", d), u[t.length] = d, u
			}

			function Wt(e, t, r) {
				var o = [],
					n = this.root.lookup("easemob.pb.MUCBody"),
					i = e.roomId,
					a = e.ext,
					s = void 0 === a ? "" : a,
					c = e.leaveOtherRooms,
					l = void 0 !== c && c,
					u = n.decode(o);
				u.mucId = {
						appKey: this.appKey,
						name: i,
						domain: "conference.easemob.com"
					}, u.operation = "join" === r ? 2 : 3, u.from = {
						name: this.context.userId
					}, u.isChatroom = !0, "join" === r && (u.ext = s, u.leaveOtherRooms = l), u = n
					.encode(u).finish();
				var d = this.root.lookup("easemob.pb.Meta").decode(o);
				d.id = t, d.from = {
					appKey: this.appKey,
					name: this.context.userId,
					domain: "easemob.com",
					client_resource: this.context.jid.clientResource
				}, d.to = {
					domain: "easemob.com"
				}, d.ns = 2, d.payload = u;
				var p = this.root.lookup("easemob.pb.CommSyncUL"),
					h = p.decode(o);
				h.meta = d, h = p.encode(h).finish();
				var f = this.root.lookup("easemob.pb.MSync"),
					m = f.decode(o);
				return m.version = this.version, m.encryptType = this.encryptType, m.command = 0, m
					.payload = h, f.encode(m).finish()
			}

			function Kt(e, t) {
				var r = de.getUniqueId(),
					o = Wt.call(this, e, r, t),
					n = "join" === t ? E.JOIN_CHATROOM : E.QUIT_CHATROOM,
					i = this.dataReport.geOperateFun({
						operationName: n
					});
				return S.size <= C && S.set(r, {
					rpt: i,
					requestName: n
				}), zt.call(this, ct(ct({}, e), {
					isHandleChatroom: !0,
					joinMsg: o,
					id: r,
					operation: t
				}), r)
			}

			function qt(e) {
				var t = this;
				return new Promise((function(r, o) {
					var n, i, a, s, c, l;
					if (t.logOut) return o({
						type: d.WEBIM_CONNECTION_CLOSED,
						message: "not login"
					});
					if (!e.id || "string" != typeof e.id || "" === e.id) return o({
						type: d.MESSAGE_PARAMETER_ERROR,
						message: 'Missing required parameter: "id"'
					});
					if (!e.to || "string" != typeof e.to || "" === e.to) return o({
						type: d.MESSAGE_PARAMETER_ERROR,
						message: 'Missing required parameter: "to"'
					});
					var u = "file" === e.type || "img" === e.type || "audio" === e.type ||
						"video" === e.type,
						p = "delivery" === e.type || "read" === e.type || "channel" === e
						.type,
						h = "cmd" === e.type,
						f = "recall" === e.type,
						m = null == e ? void 0 : e.editMessageId,
						g = !(p || f || h || m);
					if (e.id) {
						if (!u && !p || u && t.useOwnUploadFun) {
							var y = "recall" === e.type ? E.SEND_RECALL_MSG : E.SEND_MSG;
							m && (y = E.MODIFY_MESSAGE), I.size <= C && I.set(e.id, {
								rpt: t.dataReport.geOperateFun({
									operationName: y
								})
							})
						}
						g && (null === (i = null === (n = t._localCache) || void 0 === n ?
								void 0 : n.getInstance()) || void 0 === i || i
							.storeMessage(e, Ee.CREATE)), t._msgHash[e.id] = ct(ct({},
							e), {
							resolve: r,
							reject: o
						})
					}
					if (u || "combine" === e.type) return Ht.call(t, e);
					if ("txt" === e.type && (null === (a = e.msgConfig) || void 0 === a ?
							void 0 : a.languages) && Array.isArray(null === (s = e
							.msgConfig) || void 0 === s ? void 0 : s.languages) && e
						.msgConfig.languages.length > 0) {
						var v = t.translateMessage || t.translation.translateMessage;
						if (!v) throw new Error("there is no method to translate message");
						v.call(t, {
							text: e.msg,
							languages: e.msgConfig.languages
						}).then((function(r) {
							var o, n, i, a = null === (o = r.data[0]) ||
								void 0 === o ? void 0 : o.translations;
							a = a.map((function(e) {
									return {
										code: e.to,
										text: e.text
									}
								})), e.translations = a, t._msgHash[e.id]
								.translations = a, null === (i = null === (n = t
										._localCache) || void 0 === n ? void 0 :
									n.getInstance()) || void 0 === i || i
								.storeMessage(e, Ee.INPROGRESS);
							var s = Bt.call(t, e);
							zt.call(t, s, e.id)
						})).catch((function(e) {
							o(e)
						}))
					} else {
						g && (null === (l = null === (c = t._localCache) || void 0 === c ?
								void 0 : c.getInstance()) || void 0 === l || l
							.storeMessage(e, Ee.INPROGRESS));
						var _ = Bt.call(t, e);
						zt.call(t, _, e.id)
					}
				}))
			}

			function zt(e, t) {
				var r, o, n = this;
				if (e.isHandleChatroom) {
					if (!this.isOpened()) {
						var i = {
							data: "",
							type: d.WEBIM_CONNCTION_DISCONNECTED,
							message: "websocket has been disconnected"
						};
						if (S.has(e.id)) {
							var a = S.get(e.id);
							(0, a.rpt)({
								isEndApi: !0,
								data: {
									isSuccess: 0,
									requestName: a.requestName,
									requestMethod: "WEBSOCKET",
									requestUrl: this.url,
									code: _.disconnect,
									codeDesc: "websocket has been disconnected"
								}
							}), S.delete(e.id)
						}
						return Promise.reject(i)
					}
					return new Promise((function(r, o) {
						var i;
						n._msgHash[e.id] = ct(ct({}, e), {
							resolve: r,
							reject: o
						}), i = "miniCore" === n.name ? e.joinMsg : mt.call(n, e
							.joinMsg, t), n.sock.send(i)
					}))
				}
				if (!this.isOpened()) return null === (r = this.unMSyncSendMsgMap) || void 0 === r || r
					.set(t, e), !this.logOut && this.autoReconnectNumTotal < this
					.autoReconnectNumMax && (this.autoReconnectNumTotal <= this.socketHost.length &&
						this.isHttpDNS || !this.isHttpDNS) && (x.debug("need to reconnect", this
							.autoReconnectNumTotal, this.autoReconnectNumMax), this
						.offLineSendConnecting = !0, this.reconnecting || this.reconnect()), void(
						this.onError && this.onError({
							type: d.WEBIM_CONNCTION_DISCONNECTED,
							message: "websocket has been disconnected"
						}));
				o = "miniCore" === this.name ? e : mt.call(this, e, t), this.sock.send(o)
			}
			var Vt = function(e, t) {
					return e.send = qt, e.sendMsg = qt, x.debug("init Msync by ".concat(e.name)), {
						generateProvision: ft.bind(e),
						base64transform: mt.bind(e),
						distributeMeta: gt.bind(e),
						decodeMeta: Et.bind(e),
						decodeUnreadDL: yt.bind(e),
						_rebuild: vt.bind(e),
						_lastsession: Rt.bind(e),
						receiveProvision: St.bind(e),
						isInQueue: Pt.bind(e),
						decodeNotice: kt.bind(e),
						decodeMSync: Lt.bind(e),
						distributeMSync: Dt.bind(e),
						encodeChatMsg: Bt.bind(e),
						upLoadFile: Ht.bind(e),
						send: qt.bind(e),
						stopHeartBeat: bt.bind(e),
						handleChatRoom: Kt.bind(e)
					}
				},
				Jt = ["onTextMessage", "onFileMessage", "onAudioMessage", "onVideoMessage",
					"onImageMessage", "onLocationMessage", "onCustomMessage", "onCMDMessage"
				],
				Xt = function() {
					function e(e, t, r) {
						this.handlerData = {}, this.handlerData = {}, e.addEventHandler = this
							.addEventHandler.bind(this), e.removeEventHandler = this.removeEventHandler
							.bind(this)
					}
					return e.prototype.addEventHandler = function(e, t) {
						this.handlerData[e] = t
					}, e.prototype.removeEventHandler = function(e) {
						delete this.handlerData[e]
					}, e.prototype.dispatch = function(e, t) {
						for (var r in Jt.includes(e) && t ? x.debug("dispatch event: " + e, {
									id: t.id,
									type: t.type,
									time: t.time,
									from: t.from,
									to: t.to,
									chatType: t.chatType
								}) : "onMessage" === e ? x.debug("dispatch event: " + e, null == t ?
									void 0 : t.length) : x.debug("dispatch event: " + e, t || ""),
								this.handlerData) {
							var o = this.handlerData[r][e];
							o && o(t)
						}
					}, e
				}(),
				Yt = function() {};

			function Qt(e) {
				this.onOpened = e.onOpened || Yt, this.onPresence = e.onPresence || Yt, this
					.onTextMessage = e.onTextMessage || Yt, this.onPictureMessage = e
					.onPictureMessage || Yt, this.onAudioMessage = e.onAudioMessage || Yt, this
					.onVideoMessage = e.onVideoMessage || Yt, this.onFileMessage = e.onFileMessage ||
					Yt, this.onLocationMessage = e.onLocationMessage || Yt, this.onCmdMessage = e
					.onCmdMessage || Yt, this.onCustomMessage = e.onCustomMessage || Yt, this
					.onReceivedMessage = e.onReceivedMessage || Yt, this.onDeliveredMessage = e
					.onDeliveredMessage || Yt, this.onReadMessage = e.onReadMessage || Yt, this
					.onRecallMessage = e.onRecallMessage || Yt, this.onChannelMessage = e
					.onChannelMessage || Yt, this.onError = e.onError || Yt, this.onOffline = e
					.onOffline || Yt, this.onOnline = e.onOnline || Yt, this.onStatisticMessage = e
					.onStatisticMessage || Yt, this.onContactInvited = e.onContactInvited || Yt, this
					.onContactAgreed = e.onContactAgreed || Yt, this.onContactRefuse = e
					.onContactRefuse || Yt, this.onContactDeleted = e.onContactDeleted || Yt, this
					.onContactAdded = e.onContactAdded || Yt, this.onTokenWillExpire = e
					.onTokenWillExpire || Yt, this.onTokenExpired = e.onTokenExpired || Yt, this
					.onClosed = e.onClosed || Yt, this.onPresenceStatusChange = e
					.onPresenceStatusChange || Yt
			}
			var $t = {
					biz: "",
					debug: !1,
					token: ""
				},
				Zt = "https://data-reporting.agora.io/report",
				er = "https://data-reporting.sh.agoralab.co/report",
				tr = function(e) {
					var t = Number(g[e]);
					return t === g.USER_LOGIN ? "MANUALLOGIN" : t === g.MSYNC_SENDMESSAGE ?
						"SENDMESSAGE" : t > g.UNKNOWOPERATION && t < g.REST_OPERATE ? "REST" : t > g
						.REST_OPERATE && t < g.MSYNC_OPERATE ? "MESSAGE" : t > g.MSYNC_OPERATE && t < g
						.ROSTER_OPERATE ? "ROSTER" : t > g.ROSTER_OPERATE && t < g.USER_OPERATE ?
						"USER" : t > g.USER_OPERATE && t < g.GROUP_OPERATE ? "GROUP" : t > g
						.GROUP_OPERATE && t < g.CHATROOM_OPERATE ? "CHATROOM" : "OPERATION"
				},
				rr = function() {
					return (new Date).getTime()
				},
				or = function(e) {
					return [re.BAIDU, re.WX, re.DD, re.ZFB, re.TT, re.QUICK_APP, re.UNI].includes(e
						.platform)
				},
				nr = function() {
					return e = 1, t = 99999, e = Math.ceil(e), t = Math.floor(t), Math.floor(Math
						.random() * (t - e)) + e;
					var e, t
				},
				ir = {},
				ar = 1e3,
				sr = function() {
					function e(e) {
						this.eventQueue = [], this.stock = ar, this.config = e, this.governor()
					}
					return e.prototype.add = function(e) {
						this.stock <= 0 ? console.warn("Event Report limit ".concat(ar,
							" per minute")) : (this.eventQueue.push(e), this.consume(), this
							.stock -= 1)
					}, e.prototype.consume = function() {
						var e = this;
						0 !== this.eventQueue.length && (this.timer && this.eventQueue.length <=
							10 && clearTimeout(this.timer), this.timer = setTimeout((
						function() {
								var t, r = e.eventQueue.splice(0, 10),
									o = r.filter((function(e) {
										return e.appId === r[0].appId
									})),
									n = r.filter((function(e) {
										return e.appId !== r[0].appId
									}));
								(t = e.eventQueue).unshift.apply(t, n), e.batchSend(o)
							}), 1e3))
					}, e.prototype.governor = function() {
						var e = this,
							t = setInterval((function() {
								e.stock = ar
							}), 6e4);
						"undefined" != typeof addEventListener && addEventListener("beforeunload", (
							function() {
								clearInterval(t)
							}))
					}, e.prototype.batchSend = function(e) {
						var t, r;
						if (void 0 === e && (e = []), 0 !== e.length) try {
							var o = e.map((function(e) {
								e.biz, e.appId;
								var t = e.eventId,
									r = function(e, t) {
										var r = {};
										for (var o in e) Object.prototype
											.hasOwnProperty.call(e, o) && t.indexOf(
												o) < 0 && (r[o] = e[o]);
										if (null != e && "function" == typeof Object
											.getOwnPropertySymbols) {
											var n = 0;
											for (o = Object.getOwnPropertySymbols(
												e); n < o.length; n++) t.indexOf(o[
													n]) < 0 && Object.prototype
												.propertyIsEnumerable.call(e, o[
												n]) && (r[o[n]] = e[o[n]])
										}
										return r
									}(e, ["biz", "appId", "eventId"]);
								return {
									eventId: Number(t),
									body: r
								}
							}));
							! function(e, t) {
								try {
									var r = t.biz,
										o = t.appId,
										n = t.data,
										i = t.debug,
										a = t.onSuccess;
									if (!r) throw new Error("biz is not defined");
									ir.global || (ir = de.getEnvInfo());
									var s = ir;
									if (or(s)) {
										var c = {
												url: i ? er : Zt,
												data: n,
												method: "POST",
												success: function() {
													null == a || a()
												},
												fail: function() {},
												complete: function() {}
											},
											l = {
												token: e,
												appid: null != o ? o : "",
												sendts: "".concat(Math.floor((new Date)
												.getTime() / 1e3)),
												biz: r,
												debug: "".concat(i)
											};
										if ("zfb" === s.platform || "dd" === s.platform ? c
											.headers = l : c.header = l, "dd" === s.platform)
											return s.global.httpRequest(c);
										s.global.request(c)
									} else {
										var u = new XMLHttpRequest;
										u.onreadystatechange = function() {
												2 === u.readyState && (null == a || a())
											}, u.open("POST", i ? er : Zt), u.setRequestHeader(
												"Content-Type", "application/json"), u
											.setRequestHeader("token", e), u.setRequestHeader(
												"appid", null != o ? o : ""), u
											.setRequestHeader("sendts", "".concat(Math.floor((
												new Date).getTime() / 1e3))), u
											.setRequestHeader("biz", r), u.setRequestHeader(
												"debug", "".concat(i)), u.send(JSON.stringify(
												n))
									}
								} catch (e) {
									console.error(e)
								}
							}(this.config.token, {
								biz: null === (t = e[0]) || void 0 === t ? void 0 : t.biz,
								appId: null === (r = e[0]) || void 0 === r ? void 0 : r
									.appId,
								data: o,
								debug: this.config.debug,
								onSuccess: this.consume.bind(this)
							})
						} catch (e) {
							console.error(e)
						}
					}, e
				}(),
				cr = function() {
					return cr = Object.assign || function(e) {
						for (var t, r = 1, o = arguments.length; r < o; r++)
							for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t,
								n) && (e[n] = t[n]);
						return e
					}, cr.apply(this, arguments)
				},
				lr = new(function() {
					function e(e) {
						this.inited = !1, this.appId = "", this.biz = "", this.eventQueue = {}, this
							.config = $t, e && this.init(e)
					}
					return e.prototype.init = function(e) {
						var t;
						if (void 0 === e && (e = {}), !e.biz || !e.token) throw new Error(
							"Event Report: biz or token is not defined");
						try {
							this.appId = null !== (t = e.appId) && void 0 !== t ? t : "", this
								.biz = e.biz, this.config = cr(cr({}, $t), e), this.eventQueue =
								new sr(this.config), this.log(e), this.inited = !0
						} catch (e) {
							console.error(e)
						}
					}, e.prototype.send = function(e, t, r) {
						var o;
						if (void 0 === t && (t = {}), this.inited) {
							var n = cr(cr({}, t), {
								eventId: Number(e),
								biz: this.biz,
								appId: null !== (o = null == r ? void 0 : r.appId) &&
									void 0 !== o ? o : this.appId
							});
							this.eventQueue.add(n), this.log(n)
						} else console.error("Event Report: init is not called")
					}, e.prototype.log = function(e) {
						try {
							if (this.config.debug) {
								var t = e.payload,
									r = function(e, t) {
										var r = {};
										for (var o in e) Object.prototype.hasOwnProperty.call(e,
											o) && t.indexOf(o) < 0 && (r[o] = e[o]);
										if (null != e && "function" == typeof Object
											.getOwnPropertySymbols) {
											var n = 0;
											for (o = Object.getOwnPropertySymbols(e); n < o
												.length; n++) t.indexOf(o[n]) < 0 && Object
												.prototype.propertyIsEnumerable.call(e, o[n]) &&
												(r[o[n]] = e[o[n]])
										}
										return r
									}(e, ["payload"]);
								console.log("%c Event Report: ".concat(this.config.biz, " "),
										"background: #8A97FC; color: #fff"), console.table(r),
									t && (console.info("payload:"), console.table(t))
							}
						} catch (e) {
							console.error(e)
						}
					}, e
				}()),
				ur = function() {
					return ur = Object.assign || function(e) {
						for (var t, r = 1, o = arguments.length; r < o; r++)
							for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t,
								n) && (e[n] = t[n]);
						return e
					}, ur.apply(this, arguments)
				},
				dr = {
					requestName: "",
					subrequestid: "1",
					requestMethod: "GET",
					requestUrl: "",
					requestElapse: 0,
					code: 0,
					codeDesc: "",
					isLastApi: 0,
					isSuccess: 1
				},
				pr = function() {
					function e(e) {
						this.platform = de.getEnvInfo(), this.isReportDt = e.isReport || !1, this
							.isCollectDt = !0, or(this.platform) && !this.isReportDt && (this
								.isCollectDt = !1), this.eventQueue = [], this.accessChannel = "direct",
							this.options = function(e, t) {
								t.platform || (t = de.getEnvInfo());
								var r = e.org,
									o = e.appkey,
									n = e.deviceId,
									i = e.sdkVersion,
									a = (null === navigator || void 0 === navigator ? void 0 : navigator
										.userAgent) || "".concat(t.platform, "_mini_program");
								return {
									org: r,
									appkey: o,
									deviceId: n,
									sdkServiceId: "sid_".concat(de.getUniqueId(), "_").concat(nr()),
									did: a,
									sdkVersion: i,
									os: 7,
									sdkProduct: T.web
								}
							}(e, this.platform), this.sid = this.options.sdkServiceId, this.init(e)
					}
					return e.getInstance = function() {
						return e.instance
					}, e.prototype.getServiceId = function() {
						return this.sid || "sid_0"
					}, e.prototype.setIsReportDt = function(e) {
						this.isReportDt = e, e && this.rptEventQueue()
					}, e.prototype.setIsCollectDt = function(e) {
						this.isCollectDt = e, e || (this.eventQueue = [])
					}, e.prototype.rptEventQueue = function() {
						var e = this;
						this.eventQueue.length && this.eventQueue.forEach((function(t, r) {
							lr.send(t.eventId, t.dt), r >= e.eventQueue.length - 1 && (e
								.eventQueue = [])
						}))
					}, e.prototype.init = function(t) {
						e.instance || (e.instance = this, lr.init({
							biz: "im",
							token: "32f24ab2ddb74f508aa9286c356cec84",
							appId: t.appkey,
							debug: !1
						}), this.reportInit())
					}, e.prototype.reportInit = function() {
						if (this.isCollectDt) {
							var e = this.options,
								t = e.did,
								r = e.os,
								o = e.sdkVersion,
								n = e.deviceId;
							this.reportData(9674, {
								did: t,
								os: r,
								sdkVersion: o,
								deviceId: n
							})
						}
					}, e.prototype.geOperateFun = function(e) {
						var t = this;
						if (!this.isCollectDt) return function() {};
						var r = 1,
							o = 0,
							n = "",
							i = rr(),
							a = e.uid,
							s = e.operationName;
						a && (this.uid = a);
						var c = {
							uid: this.uid,
							operationId: "opr_".concat(de.getUniqueId(), "_").concat(nr()),
							requestid: "req_".concat(de.getUniqueId(), "_").concat(nr()),
							operationName: s
						};
						return function(e) {
							var a, l, u, d;
							if (e.data.isSuccess ? (o = 0, n = "") : (0 === e.data.code && (e
										.data.code = N), o = null !== (a = e.data.code) &&
									void 0 !== a ? a : o, n = null !== (l = e.data.codeDesc) &&
									void 0 !== l ? l : n), (null === (u = e.data) || void 0 ===
									u ? void 0 : u.accessChannel) && (t.accessChannel = null ===
									(d = e.data) || void 0 === d ? void 0 : d.accessChannel), e
								.isRetry ? (r++, e.data.subrequestid = "".concat(r)) : (c
									.requestid = "req_".concat(de.getUniqueId(), "_").concat(
									nr()), r = 1), e.data.isLastApi) {
								var p = rr();
								e.data.requestElapse = p - i, e.data.requestMethod = "", e.data
									.subrequestid = "0", e.data.code = 200 === o ? 0 : o, e.data
									.codeDesc = n
							} else e.data.requestName || (e.data.requestName = s);
							e.data.requestElapse || (e.data.requestElapse = rr() - i), t
								.reportData.call(t, A, ur(ur(ur(ur({}, dr), c), e.data), {
									accessChannel: t.accessChannel,
									operationType: tr(s)
								})), e.isEndApi && t.reportData.call(t, A, ur(ur(ur({}, c),
								dr), {
									isSuccess: e.data.isSuccess,
									isLastApi: 1,
									subrequestid: "0",
									requestMethod: "",
									code: 200 === o ? 0 : o,
									codeDesc: n,
									requestElapse: e.data.requestElapse,
									accessChannel: t.accessChannel,
									operationType: tr(s)
								}))
						}
					}, e.prototype.reportData = function(e, t) {
						return r = this, o = void 0, i = function() {
							var r, o, n, i, a, s, c, l;
							return function(e, t) {
								var r, o, n, i, a = {
									label: 0,
									sent: function() {
										if (1 & n[0]) throw n[1];
										return n[1]
									},
									trys: [],
									ops: []
								};
								return i = {
									next: s(0),
									throw: s(1),
									return: s(2)
								}, "function" == typeof Symbol && (i[Symbol.iterator] =
									function() {
										return this
									}), i;

								function s(i) {
									return function(s) {
										return function(i) {
											if (r) throw new TypeError(
												"Generator is already executing."
												);
											for (; a;) try {
												if (r = 1, o && (n = 2 & i[0] ?
														o.return : i[0] ? o
														.throw || ((n = o
																.return) && n
															.call(o), 0) : o
														.next) && !(n = n.call(
														o, i[1])).done)
											return n;
												switch (o = 0, n && (i = [2 & i[
														0], n.value]), i[0]) {
													case 0:
													case 1:
														n = i;
														break;
													case 4:
														return a.label++, {
															value: i[1],
															done: !1
														};
													case 5:
														a.label++, o = i[1],
															i = [0];
														continue;
													case 7:
														i = a.ops.pop(), a.trys
															.pop();
														continue;
													default:
														if (!((n = (n = a.trys)
																	.length >
																	0 && n[n
																		.length -
																		1]) ||
																6 !== i[0] &&
																2 !== i[0])) {
															a = 0;
															continue
														}
														if (3 === i[0] && (!n ||
																i[1] > n[0] &&
																i[1] < n[3])) {
															a.label = i[1];
															break
														}
														if (6 === i[0] && a
															.label < n[1]) {
															a.label = n[1], n =
																i;
															break
														}
														if (n && a.label < n[
															2]) {
															a.label = n[2], a
																.ops.push(i);
															break
														}
														n[2] && a.ops.pop(), a
															.trys.pop();
														continue
												}
												i = t.call(e, a)
											} catch (e) {
												i = [6, e], o = 0
											} finally {
												r = n = 0
											}
											if (5 & i[0]) throw i[1];
											return {
												value: i[0] ? i[1] : void 0,
												done: !0
											}
										}([i, s])
									}
								}
							}(this, (function(u) {
								switch (u.label) {
									case 0:
										return u.trys.push([0, 3, , 4]), r = rr(),
											o = 0, e !== A ? [3, 2] : [4, (d = this
												.platform, new Promise((
													function(e) {
														var t;
														d.platform || (d =
															de
															.getEnvInfo()
															);
														var r = "";
														if (d.platform ===
															re.WEB) {
															var o =
																navigator
																.connection;
															(null == o ?
																void 0 : o
																.type) ? (
																null == o ||
																o.type, r =
																v.WIFI) : (
																null == o ?
																void 0 : o
																.effectiveType
																) && (r = v[
																o
																.effectiveType
																.toLocaleUpperCase()
																]), e(r)
														} else d
															.platform === re
															.NODE ? (r = v
																.UNKNOWN, e(
																	r)) :
															null === (t = d
																.global) ||
															void 0 === t ||
															t
															.getNetworkType({
																success: function(
																	t
																	) {
																	r = v[t.networkType
																			.toLocaleUpperCase()
																			],
																		e(
																			r)
																}
															})
													})))];
									case 1:
										o = u.sent(), u.label = 2;
									case 2:
										return n = this.options, i = n.appkey, a = n
											.sdkServiceId, s = n.sdkProduct, c =
										ur({
												lts: r,
												net: o,
												appkey: i,
												sdkServiceId: a,
												sdkProduct: s
											}, t), this.isReportDt ? lr.send(e, c) :
											this.isCollectDt && this.eventQueue
											.push({
												eventId: e,
												dt: c
											}), [3, 4];
									case 3:
										return l = u.sent(), console.warn(l), [3,
										4];
									case 4:
										return [2]
								}
								var d
							}))
						}, new((n = void 0) || (n = Promise))((function(e, t) {
							function a(e) {
								try {
									c(i.next(e))
								} catch (e) {
									t(e)
								}
							}

							function s(e) {
								try {
									c(i.throw(e))
								} catch (e) {
									t(e)
								}
							}

							function c(t) {
								var r;
								t.done ? e(t.value) : (r = t.value, r instanceof n ? r :
									new n((function(e) {
										e(r)
									}))).then(a, s)
							}
							c((i = i.apply(r, o || [])).next())
						}));
						var r, o, n, i
					}, e
				}();

			function hr() {
				var e = this.context.appName,
					t = this.context.orgName;
				return !(!e || !t) || (this.onError && this.onError({
					type: d.WEBIM_CONNCTION_AUTH_ERROR,
					message: "appName or orgName is illegal"
				}), !1)
			}

			function fr() {
				var e;
				if (!this.context.accessToken) {
					var t = m.create({
						type: d.WEBIM_CONNCTION_TOKEN_NOT_ASSIGN_ERROR,
						message: "token not assign error"
					});
					return this.onError && this.onError(t), null === (e = this.eventHandler) ||
						void 0 === e || e.dispatch("onError", t), !1
				}
				return !0
			}

			function mr() {
				return fr.call(this) && hr.call(this)
			}

			function gr(e) {
				var t = e.data,
					r = e.type;
				return {
					data: {
						status: Object.keys(t.errorKeys).length > 0 ? "fail" : "success",
						errorKeys: t.errorKeys,
						successKeys: t.successKeys
					},
					type: r
				}
			}

			function Er(e) {
				var t = e.data,
					r = void 0;
				return Object.keys(t.errorKeys).length > 0 && Object.keys(t.errorKeys).forEach((
					function(e) {
						var o = t.errorKeys[e];
						r = o.includes("is not part of you") ? m.create({
								type: d.NO_PERMISSION,
								message: o
							}) : o.includes(
								"size of metadata for this single chatroom exceeds the user defined limit"
								) || o.includes(
								"total size of chatroom metadata for this app exceeds the user defined limit"
								) || o.includes("is exceeding maximum limit") ? m.create({
								type: d.MAX_LIMIT,
								message: o
							}) : o.includes("is not Legal") ? m.create({
								type: d.REQUEST_PARAMETER_ERROR,
								message: o
							}) : o.includes(
								"Failed to update userMetadata. Concurrent updates not allowed"
								) ? m.create({
								type: d.OPERATION_NOT_ALLOWED,
								message: o
							}) : m.create({
								type: d.WEBIM_CONNCTION_AJAX_ERROR,
								message: o
							})
					})), r
			}
			var yr = function() {
					return yr = Object.assign || function(e) {
						for (var t, r = 1, o = arguments.length; r < o; r++)
							for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t,
								n) && (e[n] = t[n]);
						return e
					}, yr.apply(this, arguments)
				},
				vr = function(e, t, r, o) {
					return new(r || (r = Promise))((function(n, i) {
						function a(e) {
							try {
								c(o.next(e))
							} catch (e) {
								i(e)
							}
						}

						function s(e) {
							try {
								c(o.throw(e))
							} catch (e) {
								i(e)
							}
						}

						function c(e) {
							var t;
							e.done ? n(e.value) : (t = e.value, t instanceof r ? t : new r((
								function(e) {
									e(t)
								}))).then(a, s)
						}
						c((o = o.apply(e, t || [])).next())
					}))
				},
				_r = function(e, t) {
					var r, o, n, i, a = {
						label: 0,
						sent: function() {
							if (1 & n[0]) throw n[1];
							return n[1]
						},
						trys: [],
						ops: []
					};
					return i = {
						next: s(0),
						throw: s(1),
						return: s(2)
					}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
						return this
					}), i;

					function s(i) {
						return function(s) {
							return function(i) {
								if (r) throw new TypeError("Generator is already executing.");
								for (; a;) try {
									if (r = 1, o && (n = 2 & i[0] ? o.return : i[0] ? o
											.throw || ((n = o.return) && n.call(o), 0) : o
											.next) && !(n = n.call(o, i[1])).done) return n;
									switch (o = 0, n && (i = [2 & i[0], n.value]), i[0]) {
										case 0:
										case 1:
											n = i;
											break;
										case 4:
											return a.label++, {
												value: i[1],
												done: !1
											};
										case 5:
											a.label++, o = i[1], i = [0];
											continue;
										case 7:
											i = a.ops.pop(), a.trys.pop();
											continue;
										default:
											if (!((n = (n = a.trys).length > 0 && n[n
														.length - 1]) || 6 !== i[0] && 2 !==
													i[0])) {
												a = 0;
												continue
											}
											if (3 === i[0] && (!n || i[1] > n[0] && i[1] <
													n[3])) {
												a.label = i[1];
												break
											}
											if (6 === i[0] && a.label < n[1]) {
												a.label = n[1], n = i;
												break
											}
											if (n && a.label < n[2]) {
												a.label = n[2], a.ops.push(i);
												break
											}
											n[2] && a.ops.pop(), a.trys.pop();
											continue
									}
									i = t.call(e, a)
								} catch (e) {
									i = [6, e], o = 0
								} finally {
									r = n = 0
								}
								if (5 & i[0]) throw i[1];
								return {
									value: i[0] ? i[1] : void 0,
									done: !0
								}
							}([i, s])
						}
					}
				},
				Tr = {
					singleChat: "chat",
					chatRoom: "chatroom",
					groupChat: "groupchat"
				};

			function Rr(e) {
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						url: this.apiUrl + "/" + o + "/" + n + "/users/" + this.user + "/blocks/users",
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + i
						},
						success: function(t) {
							var r = {};
							t.data.forEach((function(e) {
									r[e] = {
										name: e
									}
								})), "function" == typeof(null == e ? void 0 : e.success) && e
								.success(t)
						},
						error: function(t) {
							"function" == typeof(null == e ? void 0 : e.error) && e.error(t)
						}
					};
				return x.debug("Call getBlocklist"), $.call(this, a, E.GET_BLACK_LIST)
			}
			var Or = Rr,
				Ir = Sr;

			function Sr(e) {
				var t = this;
				if (!mr.call(this)) {
					var r = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(r)
				}
				var o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.accessToken,
					s = {
						url: this.apiUrl + "/" + n + "/" + i + "/users/" + this.user +
							"/contacts/users",
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + a
						},
						success: function(r) {
							var o = [];
							r.data.forEach((function(e) {
									o.push({
										name: e,
										subscription: "both",
										jid: t.context.jid
									})
								})), "function" == typeof(null == e ? void 0 : e.success) && e
								.success(o)
						},
						error: function(t) {
							"function" == typeof(null == e ? void 0 : e.error) && e.error(t)
						}
					};
				return x.debug("Call getContacts"), $.call(this, s, E.GET_CONTACTS)
			}

			function Cr(e) {
				if ("string" != typeof e.deviceId || "" === e.deviceId) throw Error(
					'Invalid parameter: "deviceId"');
				if ("string" != typeof e.deviceToken || "" === e.deviceToken) throw Error(
					'Invalid parameter: "deviceToken"');
				if ("string" != typeof e.notifierName || "" === e.notifierName) throw Error(
					'Invalid parameter: "notifierName"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/users/").concat(this
							.user),
						type: "PUT",
						data: JSON.stringify({
							device_id: e.deviceId,
							device_token: e.deviceToken,
							notifier_name: e.notifierName
						}),
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call uploadPushToken", e), $.call(this, a, E.UPLOAD_PUSH_TOKEN)
			}
			var Ar = Cr;

			function Nr(e) {
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/users/").concat(this
							.user, "/user_channels"),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e && (null == e ? void 0 : e.success),
						error: e && (null == e ? void 0 : e.error)
					};
				return x.debug("Call getSessionList"), $.call(this, a, E.GET_SESSION_LIST)
			}

			function Mr(e) {
				var t = this;
				if (!mr.call(this)) {
					var r = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(r)
				}
				var o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.accessToken,
					s = !!(e && "number" == typeof e.pageNum && "number" == typeof e.pageSize && e
						.pageNum > 0 && e.pageSize > 0),
					c = {
						url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/users/").concat(this
							.user, "/user_channels").concat(s ? "/page" : ""),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + a,
							"Content-Type": "application/json"
						},
						success: e && (null == e ? void 0 : e.success),
						error: e && (null == e ? void 0 : e.error)
					};
				return s && (c.data = {
					pageNum: e.pageNum,
					pageSize: e.pageSize
				}), x.debug("Call getConversationlist"), $.call(this, c, E.GET_SESSION_LIST).then((
					function(e) {
						return br.call(t, e)
					}))
			}

			function br(e) {
				var t = this,
					r = e.data.channel_infos;
				return null == r || r.forEach((function(e) {
					e.meta && "{}" !== JSON.stringify(e.meta) ? (e.meta.payload = JSON
						.parse(e.meta.payload), e.lastMessage = ge.call(t, e.meta, {
							formatCustomExts: !1
						})) : e.lastMessage = e.meta, delete e.meta
				})), e
			}

			function Ur(e) {
				if (e && "string" != typeof e.channel) throw Error("Invalid parameter channel: ".concat(
					e.channel));
				if (e && "singleChat" !== e.chatType && "groupChat" !== e.chatType) throw Error(
					"Invalid parameter chatType: ".concat(e.chatType));
				if (e && "boolean" != typeof e.deleteRoam) throw Error("Invalid parameter deleteRoam: "
					.concat(e.deleteRoam));
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r, o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.accessToken,
					s = o.jid;
				r = "singleChat" === e.chatType ? "chat" : "groupChat";
				var c = {
					url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/user/").concat(this
						.user, "/user_channel?resource=").concat(s.clientResource),
					dataType: "json",
					type: "DELETE",
					data: JSON.stringify({
						channel: e.channel,
						type: r,
						delete_roam: e.deleteRoam
					}),
					headers: {
						Authorization: "Bearer " + a,
						"Content-Type": "application/json"
					},
					success: e.success,
					error: e.error
				};
				return x.debug("Call deleteSession", e), $.call(this, c, E.DELETE_SESSION)
			}
			var Pr = Ur;

			function kr(e, t) {
				if (!mr.call(this)) {
					var r = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(r)
				}
				var o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.accessToken,
					s = ["nickname", "avatarurl", "mail", "phone", "gender", "sign", "birth", "ext"],
					c = {},
					l = de.getEnvInfo();
				if ("wx" === l.platform || "qq" === l.platform)
					if ("string" == typeof e && void 0 !== t) {
						if (!s.includes(e)) throw new Error(
							"illegal key, only these keys: nickname, avatarurl, mail, phone, gender, sign, birth, ext are allowed"
							);
						c[e] = t
					} else {
						if ("[object Object]" !== Object.prototype.toString.call(e)) throw new Error(
							"illegal params");
						s.forEach((function(t) {
							s.includes(t) && void 0 !== e[t] && (c[t] = e[t])
						}))
					}
				else if ("string" == typeof e) {
					if (!s.includes(e)) throw new Error(
						"illegal key, only these keys: nickname, avatarurl, mail, phone, gender, sign, birth, ext are allowed"
						);
					c = e + "=" + t
				} else {
					if ("[object Object]" !== Object.prototype.toString.call(e)) throw new Error(
						"illegal params");
					var u = [];
					s.forEach((function(t) {
						if (s.includes(t) && void 0 !== e[t]) {
							var r = encodeURIComponent(t),
								o = encodeURIComponent(e[t]);
							u.push(r + "=" + o)
						}
					})), c = u.join("&")
				}
				var p = {
					url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/metadata/user/")
						.concat(this.user),
					type: "PUT",
					data: c,
					dataType: "json",
					headers: {
						Authorization: "Bearer " + a,
						"Content-Type": "application/x-www-form-urlencoded"
					}
				};
				return x.debug("Call updateOwnUserInfo", e), $.call(this, p, E.UPDATE_USER_INFO)
			}
			var wr = kr;

			function Lr(e, t) {
				if (!mr.call(this)) {
					var r = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(r)
				}
				var o, n = this.context,
					i = n.orgName,
					a = n.appName,
					s = n.accessToken,
					c = [];
				if ("string" == typeof e) c = [e];
				else {
					if ("[object Array]" !== Object.prototype.toString.call(e)) throw new Error(
						"illegal params");
					c = e
				}
				o = "string" == typeof t ? [t] : t && "[object Array]" === Object.prototype.toString
					.call(t) ? t : ["nickname", "avatarurl", "mail", "phone", "gender", "sign", "birth",
						"ext"
					];
				var l = {
					url: "".concat(this.apiUrl, "/").concat(i, "/").concat(a, "/metadata/user/get"),
					type: "POST",
					data: JSON.stringify({
						targets: c,
						properties: o
					}),
					dataType: "json",
					headers: {
						Authorization: "Bearer " + s,
						"Content-Type": "application/json"
					}
				};
				return x.debug("Call fetchUserInfoById", e), $.call(this, l, E.GET_USER_INFO)
			}

			function Dr(e) {
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/users/").concat(this
							.user),
						type: "PUT",
						dataType: "json",
						data: JSON.stringify({
							nickname: e
						}),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return x.debug("Call updateCurrentUserNick", e), $.call(this, a)
			}

			function xr(e) {
				if ("string" != typeof e || "" === e) throw Error('Invalid parameter: "token"');
				var t = this.context,
					r = t.orgName,
					o = t.appName,
					n = {
						url: "".concat(this.apiUrl, "/").concat(r, "/").concat(o, "/sdk/users/").concat(
							this.user, "/token/expires"),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + e,
							"Content-Type": "application/json"
						}
					};
				return x.debug("Call getTokenExpireTimestamp", e), $.call(this, n, E.SDK_INTERNAL)
			}

			function Gr(e) {
				var t = this;
				return new Promise((function(r, o) {
					if (!e.queue) throw Error('Invalid parameter: "specified"');
					if (!mr.call(t)) {
						var n = m.create({
							type: d.REST_PARAMS_STATUS,
							message: "appkey or token error"
						});
						return Promise.reject(n)
					}(function e(t) {
						var n = this,
							i = t.count || 20;
						Br.call(this, {
							count: i,
							isGroup: !!t.isGroup,
							queue: t.queue,
							start: t.start,
							format: t.format,
							success: function(o) {
								if (o.msgs.length >= i || o.is_last) {
									var a = o.msgs.splice(0, i).reverse();
									t.success && t.success(a), r(a)
								} else e.call(n, yr(yr({}, t), {
									start: null
								}))
							},
							fail: function(e) {
								o(e), t.fail && t.fail(e)
							}
						})
					}).call(t, e), x.debug("Call fetchHistoryMessages", e)
				}))
			}

			function Br(e) {
				var t = this,
					r = e.queue,
					o = this.mr_cache[r] || (this.mr_cache[r] = {
						msgs: []
					}),
					n = this.context.userId,
					i = e.start || -1,
					a = e.count || 20;
				if (o.msgs.length >= a || o.is_last) "function" == typeof e.success && e.success(o);
				else {
					o && o.next_key && (i = o.next_key), e.start && (i = e.start);
					var s = {
							queue: r + (e.isGroup ? "@conference.easemob.com" : "@easemob.com"),
							start: i,
							end: -1
						},
						c = this.context,
						l = c.orgName,
						u = c.appName,
						p = {
							url: "".concat(this.apiUrl, "/").concat(l, "/").concat(u, "/users/").concat(
								n, "/messageroaming"),
							dataType: "json",
							type: "POST",
							headers: {
								Authorization: "Bearer " + this.token,
								"Content-Type": "application/json"
							},
							data: JSON.stringify(s),
							success: function(r) {
								return vr(t, void 0, void 0, (function() {
									var t, n, i, a, s, c, l = this;
									return _r(this, (function(u) {
										switch (u.label) {
											case 0:
												if (t = null == r ? void 0 :
													r.data, !r.data.msgs)
													return "function" ==
														typeof e.success &&
														e.success(o), o
														.is_last = !0, o
														.next_key = "", [2];
												n = t.msgs, i = n.length, o
													.is_last = t.is_last, o
													.next_key = t.next_key,
													a = function(t) {
														return vr(l, void 0,
															void 0, (
																function() {
																	var r,
																		o,
																		n,
																		i,
																		a;
																	return _r(
																		this,
																		(function(
																			s
																			) {
																			switch (
																				s
																				.label
																				) {
																				case 0:
																					for (
																						r = [],
																						t =
																						he()
																						.atob(
																							t
																							),
																						o =
																						0,
																						n =
																						t
																						.length; o <
																						n; ++
																						o
																						)
																						r
																						.push(
																							t
																							.charCodeAt(
																								o
																								)
																							);
																					return i =
																						(i = this
																							.context
																							.root
																							.lookup(
																								"easemob.pb.Meta"
																								)
																							)
																						.decode(
																							r
																							),
																						a = {
																							errorCode: 0,
																							reason: ""
																						},
																						1 !==
																						i
																						.ns ?
																						[3,
																							2] :
																						[4, Ke
																							.call(
																								this,
																								i,
																								a,
																								!
																								0,
																								e
																								.format
																								)
																						];
																				case 1:
																					return [2,
																						s
																						.sent()
																					];
																				case 2:
																					return [
																						2]
																			}
																		})
																		)
																}))
													}, s = 0, u.label = 1;
											case 1:
												return s < i ? [4, a(n[s]
													.msg)] : [3, 4];
											case 2:
												(c = u.sent()) && o.msgs
													.push(c), u.label = 3;
											case 3:
												return s++, [3, 1];
											case 4:
												return "function" ==
													typeof e.success && e
													.success(o), [2]
										}
									}))
								}))
							},
							error: function(e) {
								if (e.error && e.error_description) {
									var r = m.create({
										type: d.WEBIM_CONNCTION_AJAX_ERROR,
										message: "fetch history messages error",
										data: e
									});
									t.onError && t.onError(r)
								}
							}
						};
					$.call(this, p, E.GET_HISTORY_MSG).catch((function(t) {
						"function" == typeof e.fail && e.fail(t)
					}))
				}
			}

			function Hr(e) {
				var t = this;
				return new Promise((function(r, o) {
					var n = e.targetId,
						i = e.cursor,
						a = void 0 === i ? -1 : i,
						s = e.pageSize,
						c = void 0 === s ? 20 : s,
						l = e.chatType,
						u = e.searchDirection,
						p = e.searchOptions,
						h = void 0 === p ? {} : p,
						f = h.msgTypes,
						g = void 0 === f ? [] : f,
						E = h.startTime,
						y = void 0 === E ? null : E,
						v = h.endTime,
						_ = void 0 === v ? null : v,
						T = h.from,
						R = void 0 === T ? null : T;
					if ("string" != typeof n || "" === n) throw Error(
						'"Invalid parameter": "targetId"');
					if (R && "string" != typeof R) throw Error(
						'"Invalid parameter": "searchOptions.from"');
					if (g && !Array.isArray(g)) throw Error(
						'"Invalid parameter": "searchOptions.msgTypes"');
					if (y && "number" != typeof y) throw Error(
						'"Invalid parameter": "searchOptions.startTime"');
					if (_ && "number" != typeof y) throw Error(
						'"Invalid parameter": "searchOptions.endTime"');
					if (!mr.call(t)) {
						var O = m.create({
							type: d.REST_PARAMS_STATUS,
							message: "appkey or token error"
						});
						return o(O)
					}
					var I = t.context,
						S = I.orgName,
						C = I.appName,
						A = I.userId,
						N = "singleChat" === e.chatType ? "@easemob.com" :
						"@conference.easemob.com",
						M = {
							queue: "".concat(n).concat(N),
							start: a,
							pull_number: c,
							is_positive: "down" === u,
							msgType: g.join(",") || "",
							end: -1,
							startTime: y,
							endTime: _,
							userId: "singleChat" === l ? null : R
						},
						b = {
							url: "".concat(t.apiUrl, "/").concat(S, "/").concat(C,
								"/users/").concat(A, "/messageroaming"),
							dataType: "json",
							type: "POST",
							headers: {
								Authorization: "Bearer " + t.token,
								"Content-Type": "application/json"
							},
							data: JSON.stringify(M),
							success: function(o) {
								return vr(t, void 0, void 0, (function() {
									var t, n, i, a, s, c, l, u, d = this;
									return _r(this, (function(p) {
										switch (p.label) {
											case 0:
												t = null == o ?
													void 0 : o
													.data, n = t
													.msgs || [],
													i =
													function(
													e) {
														return vr(
															d,
															void 0,
															void 0,
															(function() {
																var t,
																	r,
																	o,
																	n,
																	i;
																return _r(
																	this,
																	(function(
																		a
																		) {
																		switch (
																			a
																			.label
																			) {
																			case 0:
																				for (
																					t = [],
																					e =
																					he()
																					.atob(
																						e
																						),
																					r =
																					0,
																					o =
																					e
																					.length; r <
																					o; ++
																					r
																					)
																					t
																					.push(
																						e
																						.charCodeAt(
																							r
																							)
																						);
																				return n =
																					(n = this
																						.context
																						.root
																						.lookup(
																							"easemob.pb.Meta"
																							)
																						)
																					.decode(
																						t
																						),
																					i = {
																						errorCode: 0,
																						reason: ""
																					},
																					1 !==
																					n
																					.ns ?
																					[3,
																						2] :
																					[4, Ke
																						.call(
																							this,
																							n,
																							i,
																							!
																							0,
																							!
																							0
																							)
																					];
																			case 1:
																				return [2,
																					a
																					.sent()
																				];
																			case 2:
																				return [
																					2]
																		}
																	})
																	)
															})
															)
													}, a = [],
													s = 0, p
													.label = 1;
											case 1:
												return s < n
													.length ? [
														4, i(n[
																s]
															.msg
															)
													] : [3, 4];
											case 2:
												(c = p
											.sent()) && a.push(
														c), p
													.label = 3;
											case 3:
												return s++, [3,
													1
												];
											case 4:
												return t.msgs =
													a, l = {
														cursor: t
															.next_key,
														messages: a,
														isLast: t
															.is_last
													}, null ===
													(u = e
														.success
														) ||
													void 0 ===
													u || u.call(
														e, l),
													r(l), [2]
										}
									}))
								}))
							},
							error: e.fail
						};
					$.call(t, b).catch((function(e) {
						o(e)
					})), x.debug("Call getHistoryMessages", e)
				}))
			}

			function jr(e, t) {
				return vr(this, void 0, void 0, (function() {
					var r, o, n, i, a, s, c;
					return _r(this, (function(l) {
						switch (l.label) {
							case 0:
								if (!mr.call(this)) return r = m.create({
									type: d.REST_PARAMS_STATUS,
									message: "appkey or token error"
								}), [2, Promise.reject(r)];
								if ("string" != typeof e || "" === e)
								throw Error('"Invalid parameter": "to"');
								return x.debug("Call addContact", e, t), o =
									this.context, n = o.orgName, i = o.appName,
									a = o.accessToken, s = o.jid, c = {
										url: "".concat(this.apiUrl, "/").concat(
												n, "/").concat(i, "/users/")
											.concat(this.user,
												"/contacts/apply?resource=")
											.concat(s.clientResource),
										type: "POST",
										dataType: "json",
										data: JSON.stringify({
											usernames: [e],
											reason: t
										}),
										headers: {
											Authorization: "Bearer " + a,
											"Content-Type": "application/json"
										}
									}, [4, $.call(this, c, E.ROSTER_ADD)];
							case 1:
								return l.sent(), [2]
						}
					}))
				}))
			}
			var Fr = Wr;

			function Wr(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s;
					return _r(this, (function(c) {
						switch (c.label) {
							case 0:
								if (!mr.call(this)) return t = m.create({
									type: d.REST_PARAMS_STATUS,
									message: "appkey or token error"
								}), [2, Promise.reject(t)];
								if ("string" != typeof e || "" === e)
								throw Error('"Invalid parameter": "to"');
								return x.debug("Call deleteContact", e), r =
									this.context, o = r.orgName, n = r.appName,
									i = r.accessToken, a = r.jid, s = {
										url: "".concat(this.apiUrl, "/").concat(
												o, "/").concat(n, "/users/")
											.concat(this.user,
												"/contacts/users/").concat(e,
												"?resource=").concat(a
												.clientResource),
										type: "DELETE",
										dataType: "json",
										headers: {
											Authorization: "Bearer " + i,
											"Content-Type": "application/json"
										}
									}, [4, $.call(this, s, E.ROSTER_REMOVE)];
							case 1:
								return c.sent(), [2]
						}
					}))
				}))
			}

			function Kr(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s;
					return _r(this, (function(c) {
						switch (c.label) {
							case 0:
								if (!mr.call(this)) return t = m.create({
									type: d.REST_PARAMS_STATUS,
									message: "appkey or token error"
								}), [2, Promise.reject(t)];
								if ("string" != typeof e || "" === e)
								throw Error('"Invalid parameter": "to"');
								return x.debug("Call acceptInvitation", e), r =
									this.context, o = r.orgName, n = r.appName,
									i = r.accessToken, a = r.jid, s = {
										url: "".concat(this.apiUrl, "/").concat(
												o, "/").concat(n, "/users/")
											.concat(this.user,
												"/contacts/accept/users/")
											.concat(e, "?resource=").concat(a
												.clientResource),
										type: "POST",
										dataType: "json",
										headers: {
											Authorization: "Bearer " + i,
											"Content-Type": "application/json"
										}
									}, [4, $.call(this, s, E.ROSTER_ACCEPT)];
							case 1:
								return c.sent(), [2]
						}
					}))
				}))
			}
			var qr = Kr;

			function zr(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s;
					return _r(this, (function(c) {
						switch (c.label) {
							case 0:
								if (!mr.call(this)) return t = m.create({
									type: d.REST_PARAMS_STATUS,
									message: "appkey or token error"
								}), [2, Promise.reject(t)];
								if ("string" != typeof e || "" === e)
								throw Error('"Invalid parameter": "to"');
								return x.debug("Call declineInvitation", e), r =
									this.context, o = r.orgName, n = r.appName,
									i = r.accessToken, a = r.jid, s = {
										url: "".concat(this.apiUrl, "/").concat(
												o, "/").concat(n, "/users/")
											.concat(this.user,
												"/contacts/decline/users/")
											.concat(e, "?resource=").concat(a
												.clientResource),
										type: "POST",
										dataType: "json",
										headers: {
											Authorization: "Bearer " + i,
											"Content-Type": "application/json"
										}
									}, [4, $.call(this, s, E.ROSTER_DECLINE)];
							case 1:
								return c.sent(), [2]
						}
					}))
				}))
			}
			var Vr = zr;

			function Jr(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s, c, l;
					return _r(this, (function(u) {
						switch (u.label) {
							case 0:
								if (!mr.call(this)) return t = m.create({
									type: d.REST_PARAMS_STATUS,
									message: "appkey or token error"
								}), [2, Promise.reject(t)];
								if (r = e.name, o = [], "string" == typeof r) {
									if ("" === r) throw Error(
										'"Invalid parameter": "name"');
									o = [r]
								} else {
									if (!Array.isArray(r)) throw Error(
										'"Invalid parameter": "name"');
									o = r
								}
								return x.debug("Call addToBlockList", e), n =
									this.context, i = n.orgName, a = n.appName,
									s = n.accessToken, c = n.jid, l = {
										url: "".concat(this.apiUrl, "/").concat(
												i, "/").concat(a, "/sdk/user/")
											.concat(this.user,
												"/blocks?resource=").concat(c
												.clientResource),
										type: "POST",
										dataType: "json",
										data: JSON.stringify({
											usernames: o
										}),
										headers: {
											Authorization: "Bearer " + s,
											"Content-Type": "application/json"
										}
									}, [4, $.call(this, l, E.ROSTER_BAN).then((
										function(e) {
											return {
												type: e.type,
												data: {
													userIds: (null ==
														e ? void 0 :
														e.data) ||
													[]
												}
											}
										}))];
							case 1:
								return [2, u.sent()]
						}
					}))
				}))
			}
			var Xr = Jr,
				Yr = Jr;

			function Qr(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s, c, l;
					return _r(this, (function(u) {
						switch (u.label) {
							case 0:
								if (!mr.call(this)) return t = m.create({
									type: d.REST_PARAMS_STATUS,
									message: "appkey or token error"
								}), [2, Promise.reject(t)];
								if (r = e.name, o = [], "string" == typeof r) {
									if ("" === r) throw Error(
										'"Invalid parameter": "name"');
									o = [r]
								} else {
									if (!Array.isArray(r)) throw Error(
										'"Invalid parameter": "name"');
									o = r
								}
								return x.debug("Call removeFromBlockList", e),
									n = this.context, i = n.orgName, a = n
									.appName, s = n.accessToken, c = n.jid,
									l = {
										url: "".concat(this.apiUrl, "/").concat(
												i, "/").concat(a, "/sdk/user/")
											.concat(this.user,
												"/blocks?resource=").concat(c
												.clientResource),
										type: "DELETE",
										dataType: "json",
										data: JSON.stringify({
											usernames: o
										}),
										headers: {
											Authorization: "Bearer " + s,
											"Content-Type": "application/json"
										}
									}, [4, $.call(this, l, E.ROSTER_ALLOW)];
							case 1:
								return u.sent(), [2]
						}
					}))
				}))
			}
			var $r = Qr,
				Zr = Qr;

			function eo(e) {
				var t = this,
					r = (null == e ? void 0 : e.ext) || "";
				if ("string" != typeof r) throw Error('"Invalid parameter": "ext"', r);
				var o = this.getUniqueId(),
					n = {
						id: o,
						to: e.to
					};
				this._msgHash[o] = yr({}, n);
				var i = "";
				void 0 !== e.chatType ? i = e.chatType : void 0 !== e.type && (i = "chat" === e.type ?
					"singleChat" : e.type);
				var a = {
					id: o,
					type: "recall",
					chatType: i,
					ackId: e.mid,
					to: e.to,
					isChatThread: e.isChatThread || !1,
					metaExt: r,
					success: function(r) {
						return vr(t, void 0, void 0, (function() {
							var t, o, n, a, s, c, l, u, d;
							return _r(this, (function(p) {
								switch (p.label) {
									case 0:
										return p.trys.push([0, 5, , 6]),
											"singleChat" !== i &&
											"groupChat" !== i ? [3, 4] :
											[4, null === (n = null === (
														o = this
														._localCache) ||
													void 0 === o ?
													void 0 : o
													.getInstance()) ||
												void 0 === n ? void 0 :
												n
												.removeMsgByServerMsgId(
													e.mid)
											];
									case 1:
										return p.sent(), [4, null === (
												s = null === (a =
													this._localCache
													) || void 0 ===
												a ? void 0 : a
												.getInstance()) ||
											void 0 === s ? void 0 :
											s
											.getConversationLastMessage(
												e.to, i)
										];
									case 2:
										return t = p.sent(), [4,
											null === (l = null === (
													c = this
													._localCache) ||
												void 0 === c ?
												void 0 : c
												.getInstance()) ||
											void 0 === l ? void 0 :
											l
											.updateLocalConversation(
												ye({
													conversationId: e
														.to,
													conversationType: i
												}), {
													lastMessageId: null ==
														t ? void 0 :
														t
														.serverMsgId
												})
										];
									case 3:
										p.sent(), p.label = 4;
									case 4:
										return null === (u = null == e ?
												void 0 : e.success) ||
											void 0 === u || u.call(e,
											r), [3, 6];
									case 5:
										return p.sent(), null === (d =
												null == e ? void 0 : e
												.success) || void 0 ===
											d || d.call(e, r), [3, 6];
									case 6:
										return [2]
								}
							}))
						}))
					},
					fail: e.fail
				};
				return x.debug("Call recallMessage", e), this.mSync.send(a, this)
			}

			function to(e) {
				var t = e || {},
					r = t.messageId,
					o = t.modifiedMessage;
				if (x.debug("Call modifyMessage", r, o), "" === r) throw Error(
					'Invalid parameter: "messageId"');
				if ("txt" !== o.type) throw Error('Invalid parameter: "modifiedMessage.type"');
				return this.mSync.send(yr({
					editMessageId: r
				}, o))
			}

			function ro(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s, c, l;
					return _r(this, (function(u) {
						switch (u.label) {
							case 0:
								if ("string" != typeof e.messageId || !e
									.messageId) throw Error(
									"Invalid parameter messageId: "
									.concat(e.messageId));
								if ("string" != typeof e.reaction || !e
									.reaction) throw Error(
									"Invalid parameter reaction: "
									.concat(e.reaction));
								return mr.call(this) ? (r = this.context, o = r
									.orgName, n = r.appName, i = r
									.accessToken, a = e.reaction, s = e
									.messageId, c = {
										msgId: s,
										message: a
									}, l = {
										url: "".concat(this.apiUrl, "/")
											.concat(o, "/").concat(n,
												"/reaction/user/").concat(
												this.user),
										type: "POST",
										data: JSON.stringify(c),
										dataType: "json",
										headers: {
											Authorization: "Bearer " + i,
											"Content-Type": "application/json"
										}
									}, [4, $.call(this, l)]) : (t = m
									.create({
										type: d.REST_PARAMS_STATUS,
										message: "appkey or token error"
									}), [2, Promise.reject(t)]);
							case 1:
								return u.sent(), [2]
						}
					}))
				}))
			}

			function oo(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s, c;
					return _r(this, (function(l) {
						switch (l.label) {
							case 0:
								if ("string" != typeof e.reaction || !e
									.reaction) throw Error(
									"Invalid parameter reactionId: "
									.concat(e.reaction));
								return mr.call(this) ? (r = this.context, o = r
									.orgName, n = r.appName, i = r
									.accessToken, a = e.messageId, s = e
									.reaction, c = {
										url: "".concat(this.apiUrl, "/")
											.concat(o, "/").concat(n,
												"/reaction/user/").concat(
												this.user, "?msgId=")
											.concat(a, "&message=").concat(
												s),
										type: "DELETE",
										dataType: "json",
										headers: {
											Authorization: "Bearer " + i,
											"Content-Type": "application/json"
										}
									}, [4, $.call(this, c)]) : (t = m
									.create({
										type: d.REST_PARAMS_STATUS,
										message: "appkey or token error"
									}), [2, Promise.reject(t)]);
							case 1:
								return l.sent(), [2]
						}
					}))
				}))
			}

			function no(e) {
				if ("string" != typeof e.chatType || !e.chatType) throw Error(
					"Invalid parameter chatType: ".concat(e.chatType));
				if (!e.messageId) throw Error("Invalid parameter messageId: ".concat(e.messageId));
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.chatType,
					s = e.messageId,
					c = {
						msgIdList: "string" == typeof s ? [s] : s,
						msgType: "singleChat" === a ? "chat" : "groupchat",
						groupId: e.groupId || null
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/reaction/user/")
							.concat(this.user),
						type: "GET",
						data: c,
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, l).then((function(e) {
					var t = e.data;
					return null == t || t.forEach((function(e) {
						null == e || e.reactionList.forEach((function(e) {
							e.isAddedBySelf = e.state, delete e
								.state, delete e.reactionId
						}))
					})), e
				}))
			}
			var io = no;

			function ao(e) {
				if ("string" != typeof e.reaction || !e.reaction) throw Error(
					"Invalid parameter reaction: ".concat(e.reaction));
				if ("string" != typeof e.messageId || !e.messageId) throw Error(
					"Invalid parameter messageId: ".concat(e.messageId));
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.cursor,
					s = e.pageSize,
					c = {
						msgId: e.messageId,
						message: e.reaction,
						currentPage: a || null,
						pageSize: s || 20
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/reaction/user/")
							.concat(this.user, "/detail"),
						type: "GET",
						data: c,
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, l).then((function(e) {
					return e.data.isAddedBySelf = e.data.state, delete e.data.state,
						delete e.data.reactionId, e
				}))
			}

			function so(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s, c, l, u, p;
					return _r(this, (function(h) {
						switch (h.label) {
							case 0:
								if ("string" != typeof e.reportType || !e
									.reportType) throw Error(
									"Invalid parameter reportType: "
									.concat(e.reportType));
								if ("string" != typeof e.messageId || !e
									.messageId) throw Error(
									"Invalid parameter messageId: "
									.concat(e.messageId));
								if ("string" != typeof e.reportReason || !e
									.reportReason) throw Error(
									"Invalid parameter messageId: "
									.concat(e.reportReason));
								return mr.call(this) ? (r = this.context, o = r
									.orgName, n = r.appName, i = r
									.accessToken, a = e.reportType, s = e
									.reportReason, c = e.messageId, l = {
										username: this.user,
										reportType: a,
										reportReason: s
									}, u = "".concat(this.apiUrl, "/")
									.concat(o, "/").concat(n, "/user/")
									.concat(this.user,
										"/moderation/report/message/")
									.concat(c), p = {
										url: u,
										type: "POST",
										data: JSON.stringify(l),
										dataType: "json",
										headers: {
											Authorization: "Bearer " + i,
											"Content-Type": "application/json"
										}
									}, [4, $.call(this, p)]) : (t = m
									.create({
										type: d.REST_PARAMS_STATUS,
										message: "appkey or token error"
									}), [2, Promise.reject(t)]);
							case 1:
								return h.sent(), [2]
						}
					}))
				}))
			}

			function co(e) {
				var t;
				return vr(this, void 0, void 0, (function() {
					var r, o, n, i, a, s, c, l, u;
					return _r(this, (function(p) {
						switch (p.label) {
							case 0:
								if ("string" != typeof e.targetId || "" === e
									.targetId) throw Error(
									'"Invalid parameter targetId": ' + e
									.targetId);
								if (!["singleChat", "groupChat"].includes(e
										.chatType)) throw Error(
									'"Invalid parameter chatType": ' + e
									.chatType);
								if (e.beforeTimeStamp && ("number" != typeof e
										.beforeTimeStamp || e.beforeTimeStamp <
										0 || (null === (t = e
											.beforeTimeStamp) || void 0 === t ?
											void 0 : t.toString().length) > 18))
									throw Error(
										'"Invalid parameter beforeTimeStamp": ' +
										e.beforeTimeStamp);
								if (e.messageIds && !(Array.isArray(e
											.messageIds) && e.messageIds
										.length > 0 && e.messageIds.length <= 20
										)) throw Error(
									'"Invalid parameter messageIds": ' +
									e.messageIds);
								if (!e.messageIds && !e.beforeTimeStamp)
								throw Error(
										"messageIds or beforeTimeStamp field is required."
										);
								return mr.call(this) ? (o = this.context, n = o
									.orgName, i = o.appName, a = o.userId,
									s = "singleChat" === e.chatType ?
									"userId" : "groupId", c =
									"singleChat" === e.chatType ? "chat" :
									"group", l = e.messageIds ? "".concat(
										this.apiUrl, "/").concat(n, "/")
									.concat(i, "/sdk/message/roaming/")
									.concat(c, "/user/").concat(a, "?")
									.concat(s, "=").concat(e.targetId,
										"&msgIdList=").concat(e.messageIds,
										"&resource=").concat(this
										.clientResource) : "".concat(this
										.apiUrl, "/").concat(n, "/").concat(
										i, "/sdk/message/roaming/").concat(
										c, "/user/").concat(a, "/time?")
									.concat(s, "=").concat(e.targetId,
										"&delTime=").concat(e
										.beforeTimeStamp, "&&resource=")
									.concat(this.clientResource), u = {
										url: l,
										dataType: "json",
										type: "DELETE",
										headers: {
											Authorization: "Bearer " + this
												.token,
											"Content-Type": "application/json"
										}
									}, x.debug("Call removeHistoryMessages",
										e), [4, $.call(this, u)]) : (r = m
									.create({
										type: d.REST_PARAMS_STATUS,
										message: "appkey or token error"
									}), [2, Promise.reject(r)]);
							case 1:
								return p.sent(), [2]
						}
					}))
				}))
			}

			function lo(e) {
				var t = this;
				if (!mr.call(this)) {
					var r = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(r)
				}
				if ((null == e ? void 0 : e.pageSize) && "number" != typeof e.pageSize) throw Error(
					"Invalid parameter pageSize: ".concat(e.pageSize));
				if ((null == e ? void 0 : e.cursor) && "string" != typeof e.cursor) throw Error(
					"Invalid parameter cursor: ".concat(e.cursor));
				var o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.accessToken,
					s = {
						url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/sdk/user/").concat(
							this.user, "/user_channels/list?"),
						type: "GET",
						dataType: "json",
						data: {
							limit: (null == e ? void 0 : e.pageSize) || 20,
							cursor: (null == e ? void 0 : e.cursor) || "",
							need_mark: !0
						},
						headers: {
							Authorization: "Bearer " + a,
							"Content-Type": "application/json"
						}
					};
				return x.debug("Call getServerConversations", e), new Promise((function(e, r) {
					$.call(t, s, E.GET_SESSION_LIST).then((function(r) {
						return vr(t, void 0, void 0, (function() {
							var t, o = this;
							return _r(this, (function(n) {
								switch (n.label) {
									case 0:
										return t = uo
											.call(this,
												r), this
											._localCache ?
											[4, Promise
												.all(t
													.data
													.conversations
													.map(
														(function(
															e
															) {
															return vr(
																o,
																void 0,
																void 0,
																(function() {
																	var t,
																		r,
																		o =
																		this;
																	return _r(
																		this,
																		(function(
																			n
																			) {
																			return null ===
																				(r = null ===
																					(t = this
																						._localCache
																						) ||
																					void 0 ===
																					t ?
																					void 0 :
																					t
																					.getInstance()
																					) ||
																				void 0 ===
																				r ||
																				r
																				.storeMessage(
																					e
																					.lastMessage,
																					Ee
																					.SUCCESS,
																					!
																					0
																					)
																				.then(
																					(function() {
																						var t,
																							r;
																						null ===
																							(r = null ===
																								(t = o
																									._localCache
																									) ||
																								void 0 ===
																								t ?
																								void 0 :
																								t
																								.getInstance()
																								) ||
																							void 0 ===
																							r ||
																							r
																							.updateLocalConversation(
																								ye({
																									conversationId: e
																										.conversationId,
																									conversationType: e
																										.conversationType
																								}), {
																									unReadCount: e
																										.unReadCount
																								}
																								)
																					})
																					),
																				[
																					2]
																		})
																		)
																})
																)
														})
														)
													)
											] : [3, 2];
									case 1:
										return n.sent(),
											e(t), [2];
									case 2:
										return e(t), [2]
								}
							}))
						}))
					})).catch((function(e) {
						r(e)
					}))
				}))
			}

			function uo(e) {
				var t = this,
					r = e.data,
					o = r.cursor,
					n = r.channel_infos,
					i = [];
				null == n || n.forEach((function(e) {
					var r = null;
					(null == e ? void 0 : e.meta) && "{}" !== JSON.stringify(e.meta) && (e
						.meta.payload = JSON.parse(e.meta.payload), "delivery" !== (r =
							ge.call(t, e.meta)).type && "read" !== r.type &&
						"channel" !== r.type && (r.chatType = me[r.chatType]));
					var o = {
						conversationId: e.session_to,
						conversationType: "chat" === e.session_type ? "singleChat" :
							"groupChat",
						isPinned: e.is_top,
						pinnedTime: e.is_top ? e.update_top_status_time : 0,
						unReadCount: e.unread_num,
						lastMessage: r
					};
					e.marks && (o.marks = e.marks.map((function(e) {
						return Je[e]
					}))), i.push(o)
				}));
				var a = {
					conversations: i,
					cursor: o || ""
				};
				return {
					type: e.type,
					data: a
				}
			}

			function po(e) {
				var t = this;
				if (!mr.call(this)) {
					var r = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(r)
				}
				if ((null == e ? void 0 : e.pageSize) && "number" != typeof e.pageSize) throw Error(
					"Invalid parameter pageSize: ".concat(e.pageSize));
				if ((null == e ? void 0 : e.cursor) && "string" != typeof e.cursor) throw Error(
					"Invalid parameter cursor: ".concat(e.cursor));
				var o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.accessToken,
					s = {
						url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/sdk/user/").concat(
							this.user, "/user_channels/list?"),
						type: "GET",
						dataType: "json",
						data: {
							limit: (null == e ? void 0 : e.pageSize) || 20,
							cursor: (null == e ? void 0 : e.cursor) || "",
							is_top: !0,
							need_mark: !0
						},
						headers: {
							Authorization: "Bearer " + a,
							"Content-Type": "application/json"
						}
					};
				return x.debug("Call getServerPinnedConversations", e), $.call(this, s, E
					.GET_SESSION_LIST).then((function(e) {
					return uo.call(t, e)
				}))
			}

			function ho(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s, c, l, u, p, h, f, g;
					return _r(this, (function(y) {
						if (!mr.call(this)) return t = m.create({
							type: d.REST_PARAMS_STATUS,
							message: "appkey or token error"
						}), [2, Promise.reject(t)];
						if (r = e.conversationId, o = e.conversationType, n = e
							.isPinned, i = "singleChat" === o ? "chat" :
							"groupChat", "string" != typeof r || "" === r)
						throw Error("Invalid parameter conversationId: "
								.concat(r));
						if (!["singleChat", "groupChat"].includes(o))
						throw Error("Invalid parameter conversationType: "
								.concat(o));
						if ("boolean" != typeof n) throw Error(
							"Invalid parameter isPinned: ".concat(n));
						return a = this.context, s = a.orgName, c = a.appName,
							l = a.accessToken, u = a.jid, p = {
								type: i,
								to: r
							}, h = n ? "" : "type=".concat(i, "&to=").concat(r,
								"&"), f = "".concat(this.apiUrl, "/").concat(s,
								"/").concat(c, "/sdk/user/").concat(this.user,
								"/user_channel/top?").concat(h, "resource=")
							.concat(u.clientResource), g = {
								url: f,
								type: n ? "POST" : "DELETE",
								dataType: "json",
								headers: {
									Authorization: "Bearer " + l,
									"Content-Type": "application/json"
								}
							}, n && (g.data = JSON.stringify(p)), x.debug(
								"Call pinConversation", e), [2, $.call(this, g,
								E.PIN_CONVERSATION).then((function(e) {
								var t = e.type,
									r = e.data;
								return {
									type: t,
									data: {
										isPinned: r.is_top || !1,
										pinnedTime: r.is_top ? r
											.update_top_status_time :
											0
									}
								}
							}))]
					}))
				}))
			}

			function fo(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s, c, l, u;
					return _r(this, (function(p) {
						switch (p.label) {
							case 0:
								if (t = e.userId, r = e.remark, !mr.call(this))
									return o = m.create({
										type: d.REST_PARAMS_STATUS,
										message: "appkey or token error"
									}), [2, Promise.reject(o)];
								if ("string" != typeof t || "" === t)
								throw Error('Invalid parameter: "userId"');
								if ("string" != typeof r) throw Error(
									'Invalid parameter: "remark"');
								return x.debug("Call setContactRemark", e), n =
									this.context, i = n.orgName, a = n.appName,
									s = n.accessToken, c = n.jid, l = "".concat(
										this.apiUrl, "/").concat(i, "/").concat(
										a, "/users/").concat(this.context
										.userId, "/contacts/users/").concat(t,
										"?resource=").concat(c.clientResource),
									u = {
										url: l,
										type: "PUT",
										data: JSON.stringify({
											remark: r
										}),
										dataType: "json",
										headers: {
											Authorization: "Bearer " + s,
											"Content-Type": "application/json"
										}
									}, [4, $.call(this, u, E
										.ROSTER_SET_CONTACT_REMARK)];
							case 1:
								return p.sent(), [2]
						}
					}))
				}))
			}

			function mo() {
				if (!mr.call(this)) {
					var e = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(e)
				}
				var t = this.context,
					r = t.orgName,
					o = t.appName,
					n = t.accessToken,
					i = {
						url: "".concat(this.apiUrl, "/").concat(r, "/").concat(o, "/users/").concat(this
							.user, "/contacts/users?needReturnRemark=true"),
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + n
						}
					};
				return x.debug("Call getAllContacts"), $.call(this, i, E
					.ROSTER_GET_ALL_CONTACTS_REMARKS).then((function(e) {
					var t = ((null == e ? void 0 : e.entities) || []).map((function(e) {
						return {
							userId: e.username,
							remark: e.remark
						}
					}));
					return {
						type: e.type,
						data: t
					}
				}))
			}

			function go(e) {
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				x.debug("Call getContactsWithCursor", e);
				var r = e || {},
					o = r.pageSize,
					n = void 0 === o ? 20 : o,
					i = r.cursor,
					a = void 0 === i ? "" : i;
				if (n && "number" != typeof n) throw Error("Invalid parameter pageSize: ".concat(e
					.pageSize));
				var s = this.context,
					c = s.orgName,
					l = s.appName,
					u = s.accessToken,
					p = {
						url: "".concat(this.apiUrl, "/").concat(c, "/").concat(l, "/users/").concat(this
								.user, "/contacts?needReturnRemark=true&limit=").concat(n, "&cursor=")
							.concat(a),
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + u
						}
					};
				return $.call(this, p, E.ROSTER_GET_ALL_CONTACTS_REMARKS_FROM_SERVER_BY_PAGE).then((
					function(e) {
						var t, r, o = (null === (t = null == e ? void 0 : e.data) || void 0 ===
								t ? void 0 : t.contacts) || [],
							n = (null === (r = null == e ? void 0 : e.data) || void 0 === r ?
								void 0 : r.cursor) || "",
							i = o.map((function(e) {
								return {
									userId: e.username,
									remark: e.remark
								}
							}));
						return {
							type: e.type,
							data: {
								cursor: n,
								contacts: i
							}
						}
					}))
			}

			function Eo(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s, c, l, u, p, h, f, g, y;
					return _r(this, (function(v) {
						switch (v.label) {
							case 0:
								if (!mr.call(this)) return t = m.create({
									type: d.REST_PARAMS_STATUS,
									message: "appkey or token error"
								}), [2, Promise.reject(t)];
								if (x.debug("Call markConversation", e), o = (
										r = e || {}).conversations, n =
									void 0 === o ? [] : o, i = r.mark, a = r
									.isMarked, !Array.isArray(n)) throw Error(
									"Invalid parameter conversations");
								if (s = n.map((function(e) {
										if (!e.conversationId || ![
												"singleChat",
												"groupChat"
											].includes(e
												.conversationType))
											throw Error(
												"Invalid parameter conversations"
												);
										return {
											to: e.conversationId,
											type: Tr[e.conversationType]
										}
									})), "boolean" != typeof a) throw Error(
									"Invalid parameter isMarked: "
									.concat(a));
								if ("number" != typeof i) throw Error(
									"Invalid parameter mark: ".concat(i)
									);
								return c = this.context, l = c.orgName, u = c
									.appName, p = c.accessToken, h = c.userId,
									f = c.jid, g = {
										mark: Je[i],
										targets: s
									}, y = {
										url: "".concat(this.apiUrl, "/").concat(
												l, "/").concat(u, "/sdk/user/")
											.concat(h,
												"/user_channels/mark?resource=")
											.concat(f.clientResource),
										dataType: "json",
										data: JSON.stringify(g),
										type: a ? "Post" : "Delete",
										headers: {
											Authorization: "Bearer " + p
										}
									}, [4, $.call(this, y, E.MARK_CONVERSATION)
										.then((function(e) {
											var t, r = (null === (t = e
														.data) ||
													void 0 === t ?
													void 0 : t.ignore
													) || [];
											r && Array.isArray(r) && r
												.length > 0 && x.debug(
													"markConversation has ignored conversations",
													r.map((function(e) {
														return {
															conversationId: e
																.to,
															conversationType: me[
																e
																.type
																]
														}
													})))
										}))
									];
							case 1:
								return v.sent(), [2]
						}
					}))
				}))
			}

			function yo(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r;
					return _r(this, (function(o) {
						return x.debug("Call addConversationMark", e), t = e
							.conversations, r = e.mark, [2, Eo.call(this, {
								conversations: t,
								mark: r,
								isMarked: !0
							})]
					}))
				}))
			}

			function vo(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r;
					return _r(this, (function(o) {
						return x.debug("Call removeConversationMark", e), t = e
							.conversations, r = e.mark, [2, Eo.call(this, {
								conversations: t,
								mark: r,
								isMarked: !1
							})]
					}))
				}))
			}

			function _o(e) {
				var t, r, o = this;
				if (!mr.call(this)) {
					var n = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(n)
				}
				if (x.debug("Call getServerConversationsByFilter", e), (null == e ? void 0 : e
					.pageSize) && "number" != typeof e.pageSize) throw Error(
					"Invalid parameter pageSize: ".concat(e.pageSize));
				if ((null == e ? void 0 : e.cursor) && "string" != typeof e.cursor) throw Error(
					"Invalid parameter cursor: ".concat(e.cursor));
				if ("number" != typeof(null === (t = null == e ? void 0 : e.filter) || void 0 === t ?
						void 0 : t.mark)) throw Error("Invalid parameter mark: ".concat(null === (r =
					null == e ? void 0 : e.filter) || void 0 === r ? void 0 : r.mark));
				var i = this.context,
					a = i.orgName,
					s = i.appName,
					c = i.accessToken,
					l = "".concat(this.apiUrl, "/").concat(a, "/").concat(s, "/sdk/user/").concat(this
						.user, "/user_channels/mark/search?"),
					u = e.pageSize,
					p = e.cursor,
					h = ((null == e ? void 0 : e.filter) || {}).mark,
					f = {
						url: l,
						type: "GET",
						dataType: "json",
						data: {
							limit: u || 10,
							cursor: p || "",
							need_mark: !0,
							mark: Je[h]
						},
						headers: {
							Authorization: "Bearer " + c,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, f, E.GET_SESSION_LIST).then((function(e) {
					return uo.call(o, e)
				}))
			}

			function To() {
				if (!mr.call(this)) {
					var e = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(e)
				}
				x.debug("Call getSelfIdsOnOtherPlatform");
				var t = this.context,
					r = t.orgName,
					o = t.appName,
					n = t.accessToken,
					i = t.userId,
					a = t.jid,
					s = {
						url: "".concat(this.apiUrl, "/").concat(r, "/").concat(o, "/users/").concat(i,
							"/resources"),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + n,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, s, E.USER_LOGGEDIN_OTHER_PLATFORM).then((function(e) {
					var t, r = null === (t = e.data) || void 0 === t ? void 0 : t.filter((
							function(e) {
								return e.res !== a.clientResource
							})),
						o = null == r ? void 0 : r.map((function(e) {
							return "".concat(i, "/").concat(e.res)
						}));
					return {
						type: e.type,
						data: o
					}
				}))
			}

			function Ro() {
				var e, t, r, o, n, i;
				return vr(this, void 0, void 0, (function() {
					var a, s, c, l, u, p, h, f, g;
					return _r(this, (function(y) {
						switch (y.label) {
							case 0:
								return mr.call(this) ? (x.debug(
										"Call deleteAllMessagesAndConversations"
										), s = this.context, c = s.orgName,
									l = s.appName, u = s.accessToken, p = s
									.userId, h = s.jid, f = "".concat(this
										.apiUrl, "/").concat(c, "/").concat(
										l, "/sdk/message/roaming/user/")
									.concat(p, "/delete/all?resource=")
									.concat(h.clientResource), g = {
										url: f,
										type: "POST",
										dataType: "json",
										headers: {
											Authorization: "Bearer " + u,
											"Content-Type": "application/json"
										}
									}, [4, $.call(this, g, E
										.REST_DELETE_MESSAGES_CONVERSATIONS
										)]) : (a = m.create({
									type: d.REST_PARAMS_STATUS,
									message: "appkey or token error"
								}), [2, Promise.reject(a)]);
							case 1:
								return y.sent(), null === (t = null === (e =
											this._localCache) || void 0 === e ?
										void 0 : e.getInstance()) || void 0 ===
									t || t.clearConversationMap(), [4, null ===
										(o = null === (r = this._localCache) ||
											void 0 === r ? void 0 : r
											.getInstance()) || void 0 === o ?
										void 0 : o.clearStoreData(
											"conversationList")
									];
							case 2:
								return y.sent(), [4, null === (i = null === (n =
											this._localCache) || void 0 ===
										n ? void 0 : n.getInstance()) ||
									void 0 === i ? void 0 : i
									.clearStoreData("message")
								];
							case 3:
								return y.sent(), [2]
						}
					}))
				}))
			}

			function Oo(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s, c, l, u, p, h, f, g, y;
					return _r(this, (function(v) {
						switch (v.label) {
							case 0:
								if (!mr.call(this)) return t = m.create({
									type: d.REST_PARAMS_STATUS,
									message: "appkey or token error"
								}), [2, Promise.reject(t)];
								if (x.debug("Call setMessagePinStatus", e), o =
									(r = e || {}).conversationId, n = void 0 ===
									o ? "" : o, i = r.conversationType, a = r
									.messageId, s = r.isPinned, "string" !=
									typeof n || "" === n) throw Error(
									"Invalid parameter conversationId");
								if ("string" != typeof a || "" === a)
								throw Error("Invalid parameter messageId");
								if ("boolean" != typeof s) throw Error(
									"Invalid parameter isPinned");
								return c = this.context, l = c.orgName, u = c
									.appName, p = c.accessToken, h = c.userId,
									f = c.jid, g = {
										to: n,
										type: Tr[i],
										pin_msg_id: a
									}, y = {
										url: "".concat(this.apiUrl, "/").concat(
												l, "/").concat(u, "/sdk/user/")
											.concat(h,
												"/user_channel/pin?resource=")
											.concat(f.clientResource),
										dataType: "json",
										data: JSON.stringify(g),
										type: s ? "Post" : "Delete",
										headers: {
											Authorization: "Bearer " + p
										}
									}, [4, $.call(this, y, E.REST_PIN_MESSAGE)];
							case 1:
								return v.sent(), [2]
						}
					}))
				}))
			}

			function Io(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n;
					return _r(this, (function(i) {
						return x.debug("Call pinMessage", e), r = (t = e || {})
							.conversationType, o = t.conversationId, n = t
							.messageId, [2, Oo.call(this, {
								conversationId: o,
								conversationType: r,
								messageId: n,
								isPinned: !0
							})]
					}))
				}))
			}

			function So(e) {
				return vr(this, void 0, void 0, (function() {
					var t, r, o, n;
					return _r(this, (function(i) {
						return x.debug("Call unpinMessage", e), r = (t = e ||
								{}).conversationType, o = t.conversationId, n =
							t.messageId, [2, Oo.call(this, {
								conversationId: o,
								conversationType: r,
								messageId: n,
								isPinned: !1
							})]
					}))
				}))
			}

			function Co(e) {
				var t = this;
				if (!mr.call(this)) {
					var r = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(r)
				}
				x.debug("Call getServerPinnedMessages", e);
				var o = e.conversationId,
					n = e.conversationType,
					i = e.pageSize,
					a = e.cursor;
				if ("string" != typeof o || "" === o) throw Error("Invalid parameter conversationId");
				if (i && "number" != typeof i) throw Error("Invalid parameter pageSize: ".concat(i));
				if (a && "string" != typeof a) throw Error("Invalid parameter cursor: ".concat(a));
				var s = this.context,
					c = s.orgName,
					l = s.appName,
					u = s.accessToken,
					p = {
						url: "".concat(this.apiUrl, "/").concat(c, "/").concat(l, "/sdk/user/").concat(
							this.user, "/user_channel/pin"),
						type: "GET",
						dataType: "json",
						data: {
							to: o,
							type: Tr[n],
							limit: i || 10,
							cursor: a || ""
						},
						headers: {
							Authorization: "Bearer " + u,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, p, E.GET_SESSION_LIST).then((function(e) {
					return {
						type: 0,
						data: {
							list: e.data.msg_infos.map((function(e) {
								e.message.payload = JSON.parse(e.message
									.payload);
								var r = e.message,
									o = e.pin_opt_at,
									n = e.pin_operator;
								return {
									message: ge.call(t, r, {
										formatChatType: !0
									}),
									pinTime: o,
									operatorId: n
								}
							})),
							cursor: e.data.cursor || ""
						}
					}
				}))
			}
			var Ao = function(e, t, r, o) {
					return new(r || (r = Promise))((function(n, i) {
						function a(e) {
							try {
								c(o.next(e))
							} catch (e) {
								i(e)
							}
						}

						function s(e) {
							try {
								c(o.throw(e))
							} catch (e) {
								i(e)
							}
						}

						function c(e) {
							var t;
							e.done ? n(e.value) : (t = e.value, t instanceof r ? t : new r((
								function(e) {
									e(t)
								}))).then(a, s)
						}
						c((o = o.apply(e, t || [])).next())
					}))
				},
				No = function(e, t) {
					var r, o, n, i, a = {
						label: 0,
						sent: function() {
							if (1 & n[0]) throw n[1];
							return n[1]
						},
						trys: [],
						ops: []
					};
					return i = {
						next: s(0),
						throw: s(1),
						return: s(2)
					}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
						return this
					}), i;

					function s(i) {
						return function(s) {
							return function(i) {
								if (r) throw new TypeError("Generator is already executing.");
								for (; a;) try {
									if (r = 1, o && (n = 2 & i[0] ? o.return : i[0] ? o
											.throw || ((n = o.return) && n.call(o), 0) : o
											.next) && !(n = n.call(o, i[1])).done) return n;
									switch (o = 0, n && (i = [2 & i[0], n.value]), i[0]) {
										case 0:
										case 1:
											n = i;
											break;
										case 4:
											return a.label++, {
												value: i[1],
												done: !1
											};
										case 5:
											a.label++, o = i[1], i = [0];
											continue;
										case 7:
											i = a.ops.pop(), a.trys.pop();
											continue;
										default:
											if (!((n = (n = a.trys).length > 0 && n[n
														.length - 1]) || 6 !== i[0] && 2 !==
													i[0])) {
												a = 0;
												continue
											}
											if (3 === i[0] && (!n || i[1] > n[0] && i[1] <
													n[3])) {
												a.label = i[1];
												break
											}
											if (6 === i[0] && a.label < n[1]) {
												a.label = n[1], n = i;
												break
											}
											if (n && a.label < n[2]) {
												a.label = n[2], a.ops.push(i);
												break
											}
											n[2] && a.ops.pop(), a.trys.pop();
											continue
									}
									i = t.call(e, a)
								} catch (e) {
									i = [6, e], o = 0
								} finally {
									r = n = 0
								}
								if (5 & i[0]) throw i[1];
								return {
									value: i[0] ? i[1] : void 0,
									done: !0
								}
							}([i, s])
						}
					}
				};

			function Mo(e) {
				if (!e || !e.data) throw Error("Invalid parameter");
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n,
							"/chatgroups?resource=").concat(a.clientResource),
						dataType: "json",
						type: "POST",
						data: JSON.stringify({
							owner: this.user,
							groupname: e.data.groupname,
							desc: e.data.desc,
							members: e.data.members,
							public: e.data.public,
							approval: e.data.approval,
							allowinvites: e.data.allowinvites,
							invite_need_confirm: e.data.inviteNeedConfirm,
							maxusers: e.data.maxusers,
							custom: e.data.ext
						}),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: function(t) {
							e.success && e.success(t)
						},
						error: e.error
					};
				return x.debug("Call createGroup:", e), $.call(this, s, E.CREATE_GROUP)
			}
			var bo = Mo;

			function Uo(e) {
				var t;
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error("Invalid parameter");
				if (!mr.call(this)) {
					var r = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(r)
				}
				var o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.accessToken,
					s = o.jid,
					c = {
						entities: [(t = {}, t["notification_ignore_" + e.groupId] = !0, t)]
					},
					l = {
						type: "PUT",
						url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/users/").concat(this
							.user, "?resource=").concat(s.clientResource),
						data: JSON.stringify(c),
						dataType: "json",
						headers: {
							Authorization: "Bearer " + a,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call blockGroupMessages", e), $.call(this, l, E.BLOCK_GROUP)
			}
			var Po = Uo;

			function ko(e) {
				if ("number" != typeof e.limit) throw Error("Invalid parameter");
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						limit: e.limit,
						cursor: e.cursor
					};
				e.cursor || delete a.cursor;
				var s = {
					url: this.apiUrl + "/" + o + "/" + n + "/publicchatgroups",
					type: "GET",
					dataType: "json",
					data: a,
					headers: {
						Authorization: "Bearer " + i,
						"Content-Type": "application/json"
					},
					success: e.success,
					error: e.error
				};
				return x.debug("Call listGroups", e), $.call(this, s, E.LIST_GROUP)
			}
			var wo = ko;

			function Lo(e) {
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						url: this.apiUrl + "/" + o + "/" + n + "/users/" + this.user +
							"/joined_chatgroups",
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e && (null == e ? void 0 : e.success),
						error: e && (null == e ? void 0 : e.error)
					};
				return x.debug("Call getJoinedGroups", e), $.call(this, a, E.GET_USER_GROUP)
			}

			function Do(e) {
				if ("number" != typeof e.pageNum || "number" != typeof e.pageSize) throw Error(
					'Invalid parameter: "pageNum or pageSize"');
				if (e.pageNum < 0 || e.pageSize < 0) throw Error(
					'"pageNum" should >= 0 and "pageSize" should >= 0');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.needAffiliations || e.needRole ? "/chatgroups/user/".concat(this.user,
						"?pagenum=").concat(e.pageNum, "&pagesize=").concat(e.pageSize,
						"&needAffiliations=").concat(e.needAffiliations, "&needRole=").concat(e
						.needRole) : "/users/".concat(this.user, "/joined_chatgroups?pagenum=").concat(e
						.pageNum, "&pagesize=").concat(e.pageSize),
					s = {
						url: this.apiUrl + "/" + o + "/" + n + a,
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e && (null == e ? void 0 : e.success),
						error: e && (null == e ? void 0 : e.error)
					};
				return x.debug("Call getGroup", e), $.call(this, s, E.GET_USER_GROUP).then((function(
				e) {
					var t = e.uri,
						r = e.entities,
						o = [];
					return t.includes("joined_chatgroups") || (r.forEach((function(e) {
						var t = {
							affiliationsCount: e.affiliations_count,
							groupName: e.name,
							groupId: e.groupId,
							role: e.permission,
							disabled: e.disabled,
							approval: e.membersonly,
							allowInvites: e.allowinvites,
							description: e.description,
							maxUsers: e.maxusers,
							public: e.public
						};
						o.push(t)
					})), e.entities = o), e
				}))
			}

			function xo(e) {
				if ("string" != typeof e.groupId || "string" != typeof e.newOwner) throw Error(
					"Invalid parameter");
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = {
						newowner: e.newOwner
					},
					o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.accessToken,
					s = o.jid,
					c = {
						url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/chatgroups/")
							.concat(e.groupId, "?resource=").concat(s.clientResource),
						type: "PUT",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + a,
							"Content-Type": "application/json"
						},
						data: JSON.stringify(r),
						success: e.success,
						error: e.error
					};
				return x.debug("Call changeOwner", e), $.call(this, c, E.CHANGE_OWNER)
			}
			var Go = xo;

			function Bo(e) {
				if ("string" != typeof e.groupId && !Array.isArray(e.groupId)) throw Error(
					'Invalid parameter: "groupId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						url: this.apiUrl + "/" + o + "/" + n + "/chatgroups/" + e.groupId +
							"?joined_time=true",
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getGroupInfo", e), $.call(this, a, E.GET_GROUP_INFO)
			}

			function Ho(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error("Invalid parameter");
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						groupname: e.groupName,
						description: e.description,
						custom: e.ext
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "?resource=").concat(a.clientResource),
						type: "PUT",
						data: JSON.stringify(c),
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call modifyGroup", e), $.call(this, l, E.MODIFY_GROUP)
			}

			function jo(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (isNaN(e.pageNum) || e.pageNum <= 0) throw Error(
					'The parameter "pageNum" should be a positive number');
				if (isNaN(e.pageSize) || e.pageSize <= 0) throw Error(
					'The parameter "pageSize" should be a positive number');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = {
						pagenum: e.pageNum,
						pagesize: e.pageSize
					},
					o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.accessToken,
					s = {
						url: this.apiUrl + "/" + n + "/" + i + "/chatgroups/" + e.groupId + "/users",
						dataType: "json",
						type: "GET",
						data: r,
						headers: {
							Authorization: "Bearer " + a,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call listGroupMember", e), $.call(this, s, E.LIST_GROUP_MEMBER)
			}
			var Fo = jo;

			function Wo(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.groupId,
					s = {
						url: this.apiUrl + "/" + o + "/" + n + "/chatgroups/" + a + "/admin",
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getGroupAdmin", e), $.call(this, s, E.GET_GROUP_ADMIN)
			}

			function Ko(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.username || "" === e.username) throw Error(
					'Invalid parameter: "username"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						newadmin: e.username
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/admin?resource=").concat(a.clientResource),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(c),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call setGroupAdmin", e), $.call(this, l, E.SET_GROUP_ADMIN)
			}
			var qo = Ko;

			function zo(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.username || "" === e.username) throw Error(
					'Invalid parameter: "username"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = e.username,
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/admin/").concat(c, "?resource=").concat(a.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call removeAdmin", e), $.call(this, l, E.REMOVE_GROUP_ADMIN)
			}
			var Vo = zo;

			function Jo(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "?version=v3&resource=").concat(a.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call destroyGroup", e), $.call(this, c, E.DISSOLVE_GROUP)
			}
			var Xo = Jo;

			function Yo(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/quit?resource=").concat(a.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call quitGroup", e), $.call(this, c, E.QUIT_GROUP)
			}
			var Qo = Yo;

			function $o(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!Array.isArray(e.users)) throw Error('Invalid parameter: "users"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = e.groupId,
					o = {
						usernames: e.users
					},
					n = this.context,
					i = n.orgName,
					a = n.appName,
					s = n.accessToken,
					c = n.jid,
					l = {
						url: "".concat(this.apiUrl, "/").concat(i, "/").concat(a, "/chatgroups/")
							.concat(r, "/invite?resource=").concat(c.clientResource),
						type: "POST",
						data: JSON.stringify(o),
						dataType: "json",
						headers: {
							Authorization: "Bearer " + s,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call inviteUsersToGroup", e), $.call(this, l, E.INVITE_TO_GROUP)
			}
			var Zo = $o;

			function en(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(e.groupId, "/apply?resource=").concat(a.clientResource),
						type: "POST",
						dataType: "json",
						data: JSON.stringify({
							message: e.message || ""
						}),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call joinGroup", e), $.call(this, s, E.JOIN_GROUP)
			}

			function tn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.applicant || "" === e.applicant) throw Error(
					'Invalid parameter: "applicant"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						applicant: e.applicant,
						verifyResult: !0,
						reason: "no clue"
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/apply_verify?resource=").concat(a.clientResource),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(c),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call agreeJoinGroup", e), $.call(this, l, E.AGREE_JOIN_GROUP)
			}
			var rn = tn;

			function on(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.applicant || "" === e.applicant) throw Error(
					'Invalid parameter: "applicant"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						applicant: e.applicant,
						verifyResult: !1,
						reason: e.reason || ""
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/apply_verify?resource=").concat(a.clientResource),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(c),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call rejectGroupJoinRequest", e), $.call(this, l, E.REJECT_JOIN_GROUP)
			}
			var nn = on;

			function an(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.invitee || "" === e.invitee) throw Error(
					'Invalid parameter: "invitee"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						invitee: e.invitee,
						verifyResult: !0
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/invite_verify?resource=").concat(a.clientResource),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(c),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call acceptGroupInvite", e), $.call(this, l, E.AGREE_INVITE_GROUP)
			}
			var sn = an;

			function cn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.invitee || "" === e.invitee) throw Error(
					'Invalid parameter: "invitee"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						invitee: e.invitee,
						verifyResult: !1
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/invite_verify?resource=").concat(a.clientResource),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(c),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call rejectGroupInvite", e), $.call(this, l, E.REJECT_INVITE_GROUP)
			}
			var ln = cn;

			function un(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.username || "" === e.username) throw Error(
					'Invalid parameter: "username"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = e.groupId,
					o = e.username,
					n = this.context,
					i = n.orgName,
					a = n.appName,
					s = n.accessToken,
					c = n.jid,
					l = {
						url: "".concat(this.apiUrl, "/").concat(i, "/").concat(a, "/chatgroups/")
							.concat(r, "/users/").concat(o, "?resource=").concat(c.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + s,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call removeGroupMember", e), $.call(this, l, E.REMOVE_GROUP_MEMBER)
			}
			var dn = un;

			function pn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!Array.isArray(e.users)) throw Error('Invalid parameter: "users"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = e.users.join(","),
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/users/").concat(c, "?resource=").concat(a.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call removeGroupMembers", e), $.call(this, l, E
					.MULTI_REMOVE_GROUP_MEMBER)
			}
			var hn = pn;

			function fn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!(Array.isArray(e.username) || "string" == typeof e.username && "" !== e.username))
					throw Error('Invalid parameter: "username"');
				if ("number" != typeof e.muteDuration) throw Error('Invalid parameter: "muteDuration"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						usernames: "string" == typeof e.username ? [e.username] : e.username,
						mute_duration: e.muteDuration
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/mute?resource=").concat(a.clientResource),
						dataType: "json",
						type: "POST",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						data: JSON.stringify(c),
						success: e.success,
						error: e.error
					};
				return x.debug("Call muteGroupMember", e), $.call(this, l, E.MUTE_GROUP_MEMBER)
			}
			var mn = fn;

			function gn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!(Array.isArray(e.username) || "string" == typeof e.username && "" !== e.username))
					throw Error('Invalid parameter: "username"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = e.username,
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/mute/").concat(c, "?resource=").concat(a.clientResource),
						dataType: "json",
						type: "DELETE",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call unmuteGroupMember", e), $.call(this, l, E.UNMUTE_GROUP_MEMBER)
			}
			var En = gn;

			function yn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.groupId,
					s = {
						url: this.apiUrl + "/" + o + "/" + n + "/chatgroups/" + a + "/mute",
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getGroupMuteList", e), $.call(this, s, E.GET_GROUP_MUTE_LIST)
			}
			var vn = yn,
				_n = yn;

			function Tn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.username || "" === e.username) throw Error(
					'Invalid parameter: "username"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = e.username,
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/blocks/users/").concat(c, "?resource=").concat(a
								.clientResource),
						type: "POST",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call blockGroupMember", e), $.call(this, l, E.BLOCK_GROUP_MEMBER)
			}
			var Rn = Tn;

			function On(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!Array.isArray(e.usernames)) throw Error('Invalid parameter: "usernames"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						usernames: e.usernames
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/blocks/users?resource=").concat(a.clientResource),
						data: JSON.stringify(c),
						type: "POST",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call blockGroupMembers", e), $.call(this, l, E.BLOCK_GROUP_MEMBERS)
			}
			var In = On;

			function Sn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.username || "" === e.username) throw Error(
					'Invalid parameter: "username"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = e.username,
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/blocks/users/").concat(c, "?resource=").concat(a
								.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call unblockGroupMember", e), $.call(this, l, E.UNBLOCK_GROUP_MEMBER)
			}
			var Cn = Sn;

			function An(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!Array.isArray(e.usernames)) throw Error('Invalid parameter: "usernames"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = e.usernames.join(","),
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/blocks/users/").concat(c, "?resource=").concat(a
								.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call unblockGroupMembers", e), $.call(this, l, E.UNBLOCK_GROUP_MEMBERS)
			}
			var Nn = An;

			function Mn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.groupId,
					s = {
						url: this.apiUrl + "/" + o + "/" + n + "/chatgroups/" + a + "/blocks/users",
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getGroupBlacklist", e), $.call(this, s, E.GET_GROUP_BLACK_LIST)
			}
			var bn = Mn,
				Un = Mn;

			function Pn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/ban?resource=").concat(a.clientResource),
						type: "POST",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call disableSendGroupMsg", e), $.call(this, c, E
					.DISABLED_SEND_GROUP_MSG)
			}

			function kn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/ban?resource=").concat(a.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call enableSendGroupMsg", e), $.call(this, c, E.ENABLE_SEND_GROUP_MSG)
			}

			function wn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!Array.isArray(e.users)) throw Error('Invalid parameter: "users"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						usernames: e.users
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/white/users?resource=").concat(a.clientResource),
						type: "POST",
						data: JSON.stringify(c),
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call addUsersToGroupWhitelist", e), $.call(this, l, E
					.ADD_USERS_TO_GROUP_WHITE)
			}
			var Ln = wn;

			function Dn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.userName || "" === e.userName) throw Error(
					'Invalid parameter: "userName"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/white/users/").concat(e.userName, "?resource=").concat(a
								.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call removeGroupAllowlistMember", e), $.call(this, c, E
					.REMOVE_GROUP_WHITE_MEMBER)
			}
			var xn = Dn,
				Gn = Dn;

			function Bn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.groupId,
					s = {
						url: this.apiUrl + "/" + o + "/" + n + "/chatgroups/" + a + "/white/users",
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getGroupAllowlist", e), $.call(this, s, E.GET_GROUP_WHITE_LIST)
			}
			var Hn = Bn;

			function jn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.userName || "" === e.userName) throw Error(
					'Invalid parameter: "userName"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.groupId,
					s = {
						url: this.apiUrl + "/" + o + "/" + n + "/chatgroups/" + a + "/white/users/" + e
							.userName,
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call isInGroupAllowlist", e), $.call(this, s, E.IS_IN_GROUP_WHITE_LIST)
			}
			var Fn = jn,
				Wn = jn;

			function Kn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.userId,
					s = {
						url: this.apiUrl + "/" + o + "/" + n + "/sdk/chatgroups/" + e.groupId +
							"/mute/" + a,
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + i
						}
					};
				return x.debug("Call isInGroupMutelist", e), $.call(this, s).then((function(e) {
					return {
						type: e.type,
						data: e.data
					}
				}))
			}

			function qn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.msgId || "" === e.msgId) throw Error(
					'Invalid parameter: "msgId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						url: this.apiUrl + "/" + o + "/" + n + "/chatgroups/" + e.groupId + "/acks/" + e
							.msgId,
						dataType: "json",
						type: "GET",
						data: {
							limit: 500,
							key: void 0
						},
						headers: {
							Authorization: "Bearer " + i
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getGroupMsgReadUser", e), $.call(this, a, E
					.GET_GROUP_MSG_READ_USER)
			}

			function zn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.groupId,
					s = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(a, "/announcement"),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call fetchGroupAnnouncement", e), $.call(this, s, E.GET_GROUP_ANN)
			}

			function Vn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.announcement) throw Error('Invalid parameter: "announcement"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = {
						announcement: e.announcement
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/announcement?resource=").concat(a.clientResource),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(c),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call updateGroupAnnouncement", e), $.call(this, l, E.UPDATE_GROUP_ANN)
			}

			function Jn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("object" != typeof e.file) throw Error('Invalid parameter: "file"');
				if (mr.call(this)) {
					var t = this.context,
						r = t.orgName,
						o = t.appName,
						n = t.accessToken,
						i = t.jid,
						a = e.groupId;
					se.call(this, {
						uploadUrl: "".concat(this.apiUrl, "/").concat(r, "/").concat(o,
							"/chatgroups/").concat(a, "/share_files?resource=").concat(i
							.clientResource),
						onFileUploadProgress: e.onFileUploadProgress,
						onFileUploadComplete: e.onFileUploadComplete,
						onFileUploadError: e.onFileUploadError,
						onFileUploadCanceled: e.onFileUploadCanceled,
						accessToken: n,
						apiUrl: this.apiUrl,
						file: e.file,
						appKey: this.context.appKey
					}, E.UPLOAD_GROUP_FILE), x.debug("Call uploadGroupSharedFile", e)
				}
			}

			function Xn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.fileId || "" === e.fileId) throw Error(
					'Invalid parameter: "file"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.groupId,
					c = e.fileId,
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(s, "/share_files/").concat(c, "?resource=").concat(a
							.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call deleteGroupSharedFile", e), $.call(this, l, E.DELETE_GROUP_FILE)
			}

			function Yn(e) {
				if ("string" != typeof e.groupId || "" === e.groupId) throw Error(
					'Invalid parameter: "groupId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.pageNum || 1,
					s = e.pageSize || 10,
					c = e.groupId,
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatgroups/")
							.concat(c, "/share_files?pagenum=").concat(a, "&pagesize=").concat(s),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getGroupSharedFilelist", e), $.call(this, l, E.GET_GROUP_FILE_LIST)
			}
			var Qn = Yn;

			function $n(e) {
				var t = this.context,
					r = t.orgName,
					o = t.appName,
					n = t.accessToken,
					i = this.apiUrl,
					a = e.groupId,
					s = e.fileId;
				ce.call(this, {
					url: "".concat(i, "/").concat(r, "/").concat(o, "/chatgroups/").concat(a,
						"/share_files/").concat(s),
					onFileDownloadComplete: e.onFileDownloadComplete,
					onFileDownloadError: e.onFileDownloadError,
					accessToken: n,
					id: s,
					secret: e.secret
				}, E.DOWN_GROUP_FILE), x.debug("Call downloadGroupSharedFile", e)
			}

			function Zn(e) {
				return Ao(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s, c, l, u, p;
					return No(this, (function(h) {
						switch (h.label) {
							case 0:
								if (t = e.groupId, r = e.userId, o = e
									.memberAttributes, "string" != typeof t ||
									"" === t) throw Error(
									'Invalid parameter: "groupId"');
								if ("string" != typeof r || "" === r)
								throw Error('Invalid parameter: "userId"');
								if ("object" != typeof o) throw Error(
									'Invalid parameter: "memberAttributes"'
									);
								return mr.call(this) ? (i = this.context, a = i
									.orgName, s = i.appName, c = i
									.accessToken, l = i.jid, u = {
										metaData: o
									}, p = {
										url: "".concat(this.apiUrl, "/")
											.concat(a, "/").concat(s,
												"/sdk/metadata/chatgroup/")
											.concat(t, "/user/").concat(r,
												"?resource=").concat(l
												.clientResource),
										type: "PUT",
										dataType: "json",
										data: JSON.stringify(u),
										headers: {
											Authorization: "Bearer " + c,
											"Content-Type": "application/json"
										}
									}, x.debug(
										"Call setGroupMemberAttributes", e),
									[4, $.call(this, p, E
										.SET_GROUP_MEMBER_ATTRS)]) : (n = m
									.create({
										type: d.REST_PARAMS_STATUS,
										message: "appkey or token error"
									}), [2, Promise.reject(n)]);
							case 1:
								return h.sent(), [2]
						}
					}))
				}))
			}

			function ei(e) {
				var t = e.groupId,
					r = e.userId;
				return ti.call(this, {
					groupId: t,
					userIds: [r]
				}).then((function(e) {
					var t;
					return {
						type: e.type,
						data: null === (t = e.data) || void 0 === t ? void 0 : t[r]
					}
				}))
			}

			function ti(e) {
				var t = e.groupId,
					r = e.userIds,
					o = e.keys,
					n = void 0 === o ? [] : o;
				if ("string" != typeof t || "" === t) throw Error('Invalid parameter: "groupId"');
				if (!Array.isArray(r) || (null == r ? void 0 : r.length) <= 0) throw Error(
					'Invalid parameter: "userIds"');
				if (!Array.isArray(n)) throw Error('Invalid parameter: "keys"');
				if (!mr.call(this)) {
					var i = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(i)
				}
				var a = this.context,
					s = a.orgName,
					c = a.appName,
					l = a.accessToken,
					u = {
						targets: r,
						properties: n
					},
					p = {
						url: "".concat(this.apiUrl, "/").concat(s, "/").concat(c,
							"/sdk/metadata/chatgroup/").concat(t, "/get"),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(u),
						headers: {
							Authorization: "Bearer " + l,
							"Content-Type": "application/json"
						}
					};
				return x.debug("Call getGroupMembersAttributes", e), $.call(this, p, E
					.GET_GROUP_MEMBER_ATTR).then((function(e) {
					return {
						type: e.type,
						data: (null == e ? void 0 : e.data) || {}
					}
				}))
			}

			function ri(e) {
				var t = this;
				if ("number" != typeof e.pagenum || "number" != typeof e.pagesize) throw Error(
					"Invalid parameter");
				if (!mr.call(this)) {
					var r = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(r)
				}
				var o = {
						pagenum: e.pagenum || 1,
						pagesize: e.pagesize || 20
					},
					n = this.context,
					i = n.orgName,
					a = n.appName,
					s = n.accessToken,
					c = {
						url: this.apiUrl + "/" + i + "/" + a + "/chatrooms",
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + s
						},
						data: o,
						success: function(t) {
							"function" == typeof e.success && e.success(t)
						},
						error: function(r) {
							r.error && r.error_description && t.onError && t.onError({
								type: d.WEBIM_CONNCTION_LOAD_CHATROOM_ERROR,
								message: r.error_description,
								data: r
							}), "function" == typeof e.error && e.error(r)
						}
					};
				return x.debug("Call getChatRooms", e), $.call(this, c, E.GET_CHATROOM_LIST)
			}

			function oi(e) {
				if ("string" != typeof e.name) throw Error("Invalid parameter");
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = {
						name: e.name,
						description: e.description,
						maxusers: e.maxusers,
						owner: this.user,
						members: e.members
					},
					o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.accessToken,
					s = o.jid,
					c = {
						url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i,
							"/chatrooms?resource=").concat(s.clientResource),
						dataType: "json",
						type: "POST",
						data: JSON.stringify(r),
						headers: {
							Authorization: "Bearer " + (e.token || a),
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call createChatRoom", e), $.call(this, c, E.CREATE_CHATROOM)
			}

			function ni(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					"Invalid parameter");
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							e.chatRoomId, "?resource=").concat(a.clientResource, "&version=v3"),
						dataType: "json",
						type: "DELETE",
						headers: {
							Authorization: "Bearer " + (e.token || i)
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call destroyChatRoom", e), $.call(this, s, E.DESTROY_CHATROOM)
			}

			function ii(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					"Invalid parameter");
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						url: this.apiUrl + "/" + o + "/" + n + "/chatrooms/" + e.chatRoomId,
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getChatRoomDetails", e), $.call(this, a, E.GET_CHATROOM_DETAIL)
			}

			function ai(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					"Invalid parameter");
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = {
						groupname: e.chatRoomName,
						description: e.description,
						maxusers: e.maxusers
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "?resource=").concat(a.clientResource),
						type: "PUT",
						data: JSON.stringify(c),
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call modifyChatRoom", e), $.call(this, l, E.MODIFY_CHATROOM)
			}

			function si(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId || "string" != typeof e
					.username) throw Error("Invalid parameter");
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = e.username,
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/users/").concat(c, "?resource=").concat(a.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call removeChatRoomMember", e), $.call(this, l, E
					.REMOVE_CHATROOM_MEMBER)
			}
			var ci = si;

			function li(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId || !Array.isArray(e.users))
					throw Error("Invalid parameter");
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = e.chatRoomId,
					o = e.users.join(","),
					n = this.context,
					i = n.orgName,
					a = n.appName,
					s = n.accessToken,
					c = n.jid,
					l = {
						url: "".concat(this.apiUrl, "/").concat(i, "/").concat(a, "/chatrooms/").concat(
							r, "/users/").concat(o, "?resource=").concat(c.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + s,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call removeChatRoomMembers", e), $.call(this, l, E
					.MULTI_REMOVE_CHATROOM_MEMBER)
			}
			var ui = li;

			function di(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId || !Array.isArray(e.users))
					throw Error("Invalid parameter");
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = e.chatRoomId,
					o = {
						usernames: e.users
					},
					n = this.context,
					i = n.orgName,
					a = n.appName,
					s = n.accessToken,
					c = n.jid,
					l = {
						url: "".concat(this.apiUrl, "/").concat(i, "/").concat(a, "/chatrooms/").concat(
							r, "/users?resource=").concat(c.clientResource),
						type: "POST",
						data: JSON.stringify(o),
						dataType: "json",
						headers: {
							Authorization: "Bearer " + s,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call addUsersToChatRoom", e), $.call(this, l, E.ADD_USERS_TO_CHATROOM)
			}

			function pi(e) {
				var t = e.roomId,
					r = e.message,
					o = void 0 === r ? "" : r,
					n = e.ext,
					i = void 0 === n ? "" : n,
					a = e.leaveOtherRooms,
					s = void 0 !== a && a,
					c = e.success,
					l = e.error;
				if ("string" != typeof t || "" === t) throw Error("Invalid parameter roomId");
				if ("string" != typeof i) throw Error("Invalid parameter ext");
				if ("boolean" != typeof s) throw Error("Invalid parameter leaveOtherRooms");
				if (!mr.call(this)) {
					var u = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(u)
				}
				return x.debug("Call joinChatRoom", e), this.logOut ? Promise.reject({
					type: d.WEBIM_CONNECTION_CLOSED,
					message: "not login"
				}) : this.mSync.handleChatRoom({
					roomId: t,
					ext: i,
					leaveOtherRooms: s,
					message: o,
					success: c,
					error: l
				}, "join")
			}

			function hi(e) {
				if ("string" != typeof e.roomId || "" === e.roomId) throw Error("Invalid parameter");
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				return x.debug("Call leaveChatRoom", e), this.logOut ? Promise.reject({
					type: d.WEBIM_CONNECTION_CLOSED,
					message: "not login"
				}) : this.mSync.handleChatRoom(e, "leave")
			}
			var fi = hi;

			function mi(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if (isNaN(e.pageNum) || e.pageNum <= 0) throw Error(
					'The parameter "pageNum" should be a positive number');
				if (isNaN(e.pageSize) || e.pageSize <= 0) throw Error(
					'The parameter "pageSize" should be a positive number');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = {
						pagenum: e.pageNum,
						pagesize: e.pageSize
					},
					o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.accessToken,
					s = {
						url: this.apiUrl + "/" + n + "/" + i + "/chatrooms/" + e.chatRoomId + "/users",
						dataType: "json",
						type: "GET",
						data: r,
						headers: {
							Authorization: "Bearer " + a,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call listChatRoomMembers", e), $.call(this, s, E.LIST_CHATROOM_MEMBERS)
			}
			var gi = mi;

			function Ei(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.chatRoomId,
					s = {
						url: this.apiUrl + "/" + o + "/" + n + "/chatrooms/" + a + "/admin",
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getChatRoomAdmin", e), $.call(this, s, E.GET_CHATROOM_ADMIN)
			}

			function yi(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if ("string" != typeof e.username || "" === e.username) throw Error(
					'Invalid parameter: "username"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = {
						newadmin: e.username
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/admin?resource=").concat(a.clientResource),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(c),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call setChatRoomAdmin", e), $.call(this, l, E.SET_CHATROOM_ADMIN)
			}

			function vi(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if ("string" != typeof e.username || "" === e.username) throw Error(
					'Invalid parameter: "username"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = e.username,
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/admin/").concat(c, "?resource=").concat(a.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call removeChatRoomAdmin", e), $.call(this, l, E.REMOVE_CHATROOM_ADMIN)
			}

			function _i(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "groupId"');
				if ("string" != typeof e.username || "" === e.username) throw Error(
					'Invalid parameter: "username"');
				if ("number" != typeof e.muteDuration) throw Error('Invalid parameter: "muteDuration"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = {
						usernames: [e.username],
						mute_duration: e.muteDuration
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/mute?resource=").concat(a.clientResource),
						dataType: "json",
						type: "POST",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						data: JSON.stringify(c),
						success: e.success,
						error: e.error
					};
				return x.debug("Call muteChatRoomMember", e), $.call(this, l, E.MUTE_CHATROOM_MEMBER)
			}

			function Ti(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if ("string" != typeof e.username || "" === e.username) throw Error(
					'Invalid parameter: "username"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = e.username,
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/mute/").concat(c, "?resource=").concat(a.clientResource),
						dataType: "json",
						type: "DELETE",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call unmuteChatRoomMember", e), $.call(this, l, E
					.REMOVE_MUTE_CHATROOM_MEMBER)
			}
			var Ri = Ti;

			function Oi(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.chatRoomId,
					s = {
						url: this.apiUrl + "/" + o + "/" + n + "/chatrooms/" + a + "/mute",
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getChatRoomMutelist", e), $.call(this, s, E
					.GET_MUTE_CHATROOM_MEMBERS)
			}
			var Ii = Oi,
				Si = Oi;

			function Ci(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if ("string" != typeof e.username || "" === e.username) throw Error(
					'Invalid parameter: "username"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = e.username,
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/blocks/users/").concat(c, "?resource=").concat(a.clientResource),
						type: "POST",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call blockChatRoomMember", e), $.call(this, l, E
					.SET_CHATROOM_MEMBER_TO_BLACK)
			}
			var Ai = Ci;

			function Ni(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if (!Array.isArray(e.usernames)) throw Error('Invalid parameter: "usernames"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = {
						usernames: e.usernames
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/blocks/users?resource=").concat(a.clientResource),
						data: JSON.stringify(c),
						type: "POST",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Chat blockChatRoomMembers:", l), $.call(this, l, E
					.MULTI_SET_CHATROOM_MEMBER_TO_BLACK)
			}
			var Mi = Ni;

			function bi(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if ("string" != typeof e.username || "" === e.username) throw Error(
					'Invalid parameter: "username"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = e.username,
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/blocks/users/").concat(c, "?resource=").concat(a.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call unblockChatRoomMember", e), $.call(this, l, E
					.REMOVE_CHATROOM_MEMBER_BLACK)
			}
			var Ui = bi;

			function Pi(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if (!Array.isArray(e.usernames)) throw Error('Invalid parameter: "usernames"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = e.usernames.join(","),
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/blocks/users/").concat(c, "?resource=").concat(a.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call unblockChatRoomMembers", e), $.call(this, l, E
					.MULTI_REMOVE_CHATROOM_MEMBER_BLACK)
			}
			var ki = Pi;

			function wi(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.chatRoomId,
					s = {
						url: this.apiUrl + "/" + o + "/" + n + "/chatrooms/" + a + "/blocks/users",
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getChatRoomBlocklist", e), $.call(this, s, E
					.GET_CHATROOM_BLOCK_MEMBERS)
			}
			var Li = wi,
				Di = wi;

			function xi(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/ban?resource=").concat(a.clientResource),
						type: "POST",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call disableSendChatRoomMsg", e), $.call(this, c, E
					.DISABLED_CHATROOM_SEND_MSG)
			}

			function Gi(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/ban?resource=").concat(a.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call enableSendChatRoomMsg", e), $.call(this, c, E
					.ENABLE_CHATROOM_SEND_MSG)
			}

			function Bi(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if (!Array.isArray(e.users)) throw Error('Invalid parameter: "users"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = {
						usernames: e.users
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/white/users?resource=").concat(a.clientResource),
						type: "POST",
						data: JSON.stringify(c),
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call addUsersToChatRoomWhitelist", e), $.call(this, l, E
					.ADD_USERS_TO_CHATROOM)
			}
			var Hi = Bi;

			function ji(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if ("string" != typeof e.userName || "" === e.userName) throw Error(
					'Invalid parameter: "userName"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.chatRoomId,
					c = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/white/users/").concat(e.userName, "?resource=").concat(a
							.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call removeChatRoomAllowlistMember", e), $.call(this, c, E
					.REMOVE_CHATROOM_WHITE_USERS)
			}
			var Fi = ji,
				Wi = ji;

			function Ki(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.chatRoomId,
					s = {
						url: this.apiUrl + "/" + o + "/" + n + "/chatrooms/" + a + "/white/users",
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getChatRoomAllowlist", e), $.call(this, s, E
					.GET_CHATROOM_WHITE_USERS)
			}
			var qi = Ki;

			function zi(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if ("string" != typeof e.userName || "" === e.userName) throw Error(
					'Invalid parameter: "userName"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.chatRoomId,
					s = {
						url: this.apiUrl + "/" + o + "/" + n + "/chatrooms/" + a + "/white/users/" + e
							.userName,
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call isInChatRoomAllowlist", e), $.call(this, s, E
					.CHECK_CHATROOM_WHITE_USER)
			}
			var Vi = zi;

			function Ji(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					'Invalid parameter: "chatRoomId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.userId,
					s = {
						url: this.apiUrl + "/" + o + "/" + n + "/sdk/chatrooms/" + e.chatRoomId +
							"/mute/" + a,
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + i
						}
					};
				return x.debug("Call isInChatRoomMutelist", e), $.call(this, s).then((function(e) {
					return {
						type: e.type,
						data: e.data
					}
				}))
			}

			function Xi(e) {
				if ("string" != typeof e.roomId || "" === e.roomId) throw Error(
					'Invalid parameter: "roomId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.roomId,
					s = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							a, "/announcement"),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call fetchChatRoomAnnouncement", e), $.call(this, s, E.GET_CHATROOM_ANN)
			}

			function Yi(e) {
				if ("string" != typeof e.roomId || "" === e.roomId) throw Error(
					'Invalid parameter: "roomId"');
				if ("string" != typeof e.announcement) throw Error('Invalid parameter: "announcement"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.roomId,
					c = {
						announcement: e.announcement
					},
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/announcement?resource=").concat(a.clientResource),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(c),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call updateChatRoomAnnouncement:", e), $.call(this, l, E
					.UPDATE_CHATROOM_ANN)
			}

			function Qi(e) {
				if ("string" != typeof e.roomId || "" === e.roomId) throw Error(
					'Invalid parameter: "roomId"');
				if ("object" != typeof e.file) throw Error('Invalid parameter: "file"');
				if (mr.call(this)) {
					var t = this.context,
						r = t.orgName,
						o = t.appName,
						n = t.accessToken,
						i = t.jid,
						a = e.roomId;
					se.call(this, {
						uploadUrl: "".concat(this.apiUrl, "/").concat(r, "/").concat(o,
							"/chatrooms/").concat(a, "/share_files?resource=").concat(i
							.clientResource),
						onFileUploadProgress: e.onFileUploadProgress,
						onFileUploadComplete: e.onFileUploadComplete,
						onFileUploadError: e.onFileUploadError,
						onFileUploadCanceled: e.onFileUploadCanceled,
						accessToken: n,
						apiUrl: this.apiUrl,
						file: e.file,
						appKey: this.context.appKey
					}, E.UPLOAD_CHATROOM_FILE), x.debug("Call uploadChatRoomSharedFile", e)
				}
			}

			function $i(e) {
				if ("string" != typeof e.roomId || "" === e.roomId) throw Error(
					'Invalid parameter: "roomId"');
				if ("string" != typeof e.fileId || "" === e.fileId) throw Error(
					'Invalid parameter: "fileId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = e.roomId,
					c = e.fileId,
					l = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							s, "/share_files/").concat(c, "?resource=").concat(a.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call deleteChatRoomSharedFile", e), $.call(this, l, E
					.DELETE_CHATROOM_FILE)
			}

			function Zi(e) {
				if ("string" != typeof e.roomId || "" === e.roomId) throw Error(
					'Invalid parameter: "roomId"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = e.roomId,
					s = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/chatrooms/").concat(
							a, "/share_files"),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json",
							accept: "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call fetchChatRoomSharedFileList", e), $.call(this, s, E
					.GET_CHATROOM_FILES)
			}
			var ea = Zi;

			function ta(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					"Invalid parameter chatRoomId: " + e.chatRoomId);
				if (e.attributeKeys && !Array.isArray(e.attributeKeys)) throw Error(
					'"Invalid parameter attributeKeys": ' + e.attributeKeys);
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = (r.jid, e.chatRoomId),
					s = {
						keys: e.attributeKeys
					},
					c = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/metadata/chatroom/")
							.concat(a),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(s),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return x.debug("Call getChatRoomAttributes:", e), $.call(this, c, E.GET_CHATROOM_ATTR)
					.then((function(e) {
						return {
							data: e.data,
							type: e.type
						}
					}))
			}

			function ra(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					"Invalid parameter chatRoomId: " + e.chatRoomId);
				if ("object" != typeof e.attributes) throw Error("Invalid parameter attributes: " + e
					.attributes);
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.userId,
					s = e.chatRoomId,
					c = e.attributes,
					l = e.autoDelete,
					u = void 0 === l || l,
					p = e.isForced ? "/forced" : "",
					h = {
						metaData: c,
						autoDelete: u ? "DELETE" : "NO_DELETE"
					},
					f = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/metadata/chatroom/")
							.concat(s, "/user/").concat(a) + p,
						type: "PUT",
						dataType: "json",
						data: JSON.stringify(h),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return x.debug("Call setChatRoomAttributes:", e), $.call(this, f, E.SET_CHATROOM_ATTR)
					.then((function(e) {
						return gr(e)
					}))
			}

			function oa(e) {
				var t;
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					"Invalid parameter chatRoomId: " + e.chatRoomId);
				if ("string" != typeof e.attributeKey || "" === e.attributeKey) throw Error(
					"Invalid parameter attributeKey: " + e.attributeKey);
				if ("string" != typeof e.attributeValue || "" === e.attributeValue) throw Error(
					"Invalid parameter attributeValue: " + e.attributeValue);
				if (!mr.call(this)) {
					var r = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(r)
				}
				var o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.accessToken,
					s = o.userId,
					c = e.chatRoomId,
					l = e.attributeKey,
					u = e.attributeValue,
					p = e.autoDelete,
					h = void 0 === p || p,
					f = e.isForced ? "/forced" : "",
					g = {
						metaData: (t = {}, t[l] = u, t),
						autoDelete: h ? "DELETE" : "NO_DELETE"
					},
					y = {
						url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/metadata/chatroom/")
							.concat(c, "/user/").concat(s) + f,
						type: "PUT",
						dataType: "json",
						data: JSON.stringify(g),
						headers: {
							Authorization: "Bearer " + a,
							"Content-Type": "application/json"
						}
					};
				return x.debug("Call setChatRoomAttribute:", e), $.call(this, y, E.SET_CHATROOM_ATTR)
					.then((function(e) {
						var t = Er(e);
						if (t) throw t
					}))
			}

			function na(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					"Invalid parameter chatRoomId: " + e.chatRoomId);
				if (!Array.isArray(e.attributeKeys)) throw Error('"Invalid parameter attributes": ' + e
					.attributeKeys);
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.userId,
					s = e.chatRoomId,
					c = e.attributeKeys,
					l = e.isForced ? "/forced" : "",
					u = {
						keys: c
					},
					p = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/metadata/chatroom/")
							.concat(s, "/user/").concat(a) + l,
						type: "DELETE",
						dataType: "json",
						data: JSON.stringify(u),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return x.debug("Call removeChatRoomAttributes:", e), $.call(this, p, E
					.DELETE_CHATROOM_ATTR).then((function(e) {
					return gr(e)
				}))
			}

			function ia(e) {
				if ("string" != typeof e.chatRoomId || "" === e.chatRoomId) throw Error(
					"Invalid parameter chatRoomId: " + e.chatRoomId);
				if ("string" != typeof e.attributeKey || "" === e.attributeKey) throw Error(
					'"Invalid parameter attributeKey": ' + e.attributeKey);
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.userId,
					s = e.chatRoomId,
					c = e.attributeKey,
					l = e.isForced ? "/forced" : "",
					u = {
						keys: [c]
					},
					p = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/metadata/chatroom/")
							.concat(s, "/user/").concat(a) + l,
						type: "DELETE",
						dataType: "json",
						data: JSON.stringify(u),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return x.debug("Call removeChatRoomAttribute:", e), $.call(this, p, E
					.DELETE_CHATROOM_ATTR).then((function(e) {
					var t = Er(e);
					if (t) throw t
				}))
			}

			function aa(e) {
				var t = this,
					r = e || {},
					o = r.pageNum,
					n = r.pageSize;
				if (isNaN(o) || o <= 0) throw Error("Invalid parameter pageNum:".concat(o));
				if (isNaN(n) || n <= 0) throw Error("Invalid parameter pageSize:".concat(n));
				if (!mr.call(this)) {
					var i = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(i)
				}
				var a = {
						pagenum: o,
						pagesize: n,
						detail: !0
					},
					s = this.context,
					c = s.orgName,
					l = s.appName,
					u = s.accessToken,
					p = {
						url: "".concat(this.apiUrl, "/").concat(c, "/").concat(l, "/users/").concat(this
							.user, "/joined_chatrooms"),
						dataType: "json",
						type: "GET",
						data: a,
						headers: {
							Authorization: "Bearer " + u,
							"Content-Type": "application/json"
						}
					};
				return x.debug("Call getJoinedChatRooms", e), $.call(this, p, E
					.GET_USER_JOINED_CHATROOM).then((function(e) {
					var r = (e.data || []).map((function(e) {
						var r = e.id,
							o = e.title,
							n = e.owner,
							i = e.created,
							a = e.description,
							s = e.max_users;
						return {
							id: r,
							name: o,
							owner: n.split("".concat(t.appKey, "_"))[1],
							created: i,
							description: a,
							maxusers: s
						}
					}));
					return {
						type: e.type,
						data: r
					}
				}))
			}
			var sa = function(e, t, r, o) {
					return new(r || (r = Promise))((function(n, i) {
						function a(e) {
							try {
								c(o.next(e))
							} catch (e) {
								i(e)
							}
						}

						function s(e) {
							try {
								c(o.throw(e))
							} catch (e) {
								i(e)
							}
						}

						function c(e) {
							var t;
							e.done ? n(e.value) : (t = e.value, t instanceof r ? t : new r((
								function(e) {
									e(t)
								}))).then(a, s)
						}
						c((o = o.apply(e, t || [])).next())
					}))
				},
				ca = function(e, t) {
					var r, o, n, i, a = {
						label: 0,
						sent: function() {
							if (1 & n[0]) throw n[1];
							return n[1]
						},
						trys: [],
						ops: []
					};
					return i = {
						next: s(0),
						throw: s(1),
						return: s(2)
					}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
						return this
					}), i;

					function s(i) {
						return function(s) {
							return function(i) {
								if (r) throw new TypeError("Generator is already executing.");
								for (; a;) try {
									if (r = 1, o && (n = 2 & i[0] ? o.return : i[0] ? o
											.throw || ((n = o.return) && n.call(o), 0) : o
											.next) && !(n = n.call(o, i[1])).done) return n;
									switch (o = 0, n && (i = [2 & i[0], n.value]), i[0]) {
										case 0:
										case 1:
											n = i;
											break;
										case 4:
											return a.label++, {
												value: i[1],
												done: !1
											};
										case 5:
											a.label++, o = i[1], i = [0];
											continue;
										case 7:
											i = a.ops.pop(), a.trys.pop();
											continue;
										default:
											if (!((n = (n = a.trys).length > 0 && n[n
														.length - 1]) || 6 !== i[0] && 2 !==
													i[0])) {
												a = 0;
												continue
											}
											if (3 === i[0] && (!n || i[1] > n[0] && i[1] <
													n[3])) {
												a.label = i[1];
												break
											}
											if (6 === i[0] && a.label < n[1]) {
												a.label = n[1], n = i;
												break
											}
											if (n && a.label < n[2]) {
												a.label = n[2], a.ops.push(i);
												break
											}
											n[2] && a.ops.pop(), a.trys.pop();
											continue
									}
									i = t.call(e, a)
								} catch (e) {
									i = [6, e], o = 0
								} finally {
									r = n = 0
								}
								if (5 & i[0]) throw i[1];
								return {
									value: i[0] ? i[1] : void 0,
									done: !0
								}
							}([i, s])
						}
					}
				};

			function la(e) {
				return sa(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s, c, l;
					return ca(this, (function(u) {
						switch (u.label) {
							case 0:
								if ("string" != typeof e.description)
								throw Error(
										'Invalid parameter: "description"');
								return mr.call(this) ? (r = this.context, o = r
									.accessToken, n = r.orgName, i = r
									.appName, a = r.userId, s = this.context
									.jid.clientResource, c = {
										ext: e.description
									}, l = {
										url: "".concat(this.apiUrl, "/")
											.concat(n, "/").concat(i,
												"/users/").concat(a,
												"/presence/").concat(s,
												"/1"),
										type: "POST",
										dataType: "json",
										data: JSON.stringify(c),
										headers: {
											Authorization: "Bearer " + o,
											"Content-Type": "application/json"
										},
										success: e.success,
										error: e.error
									}, x.debug("Call publishPresence:", e),
									[4, $.call(this, l)]) : (t = m.create({
									type: d.REST_PARAMS_STATUS,
									message: "appkey or token error"
								}), [2, Promise.reject(t)]);
							case 1:
								return u.sent(), [2]
						}
					}))
				}))
			}

			function ua(e) {
				if (!Array.isArray(e.usernames)) throw Error('Invalid parameter: "usernames"');
				if (!e.usernames.length) throw Error('"usernames" can not be empty');
				if ("number" != typeof e.expiry) throw Error('Invalid parameter: "expiry"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.userId,
					a = r.accessToken,
					s = {
						usernames: e.usernames
					},
					c = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/users/").concat(i,
							"/presence/").concat(e.expiry),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(s),
						headers: {
							Authorization: "Bearer " + a,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call subscribePresence:", e), $.call(this, c).then((function(e) {
					return e.data = {
						result: null == e ? void 0 : e.result
					}, e
				}))
			}

			function da(e) {
				return sa(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s;
					return ca(this, (function(c) {
						switch (c.label) {
							case 0:
								if (!Array.isArray(e.usernames)) throw Error(
									'Invalid parameter: "usernames"');
								if (!e.usernames.length) throw Error(
									'"usernames" can not be empty');
								return mr.call(this) ? (r = this.context, o = r
									.orgName, n = r.appName, i = r.userId,
									a = r.accessToken, s = {
										url: "".concat(this.apiUrl, "/")
											.concat(o, "/").concat(n,
												"/users/").concat(i,
												"/presence"),
										type: "DELETE",
										dataType: "json",
										data: JSON.stringify(e.usernames),
										headers: {
											Authorization: "Bearer " + a,
											"Content-Type": "application/json"
										},
										success: e.success,
										error: e.error
									}, x.debug("Call unsubscribePresence:",
										e), [4, $.call(this, s)]) : (t = m
									.create({
										type: d.REST_PARAMS_STATUS,
										message: "appkey or token error"
									}), [2, Promise.reject(t)]);
							case 1:
								return c.sent(), [2]
						}
					}))
				}))
			}

			function pa(e) {
				if ("number" != typeof e.pageNum || "number" != typeof e.pageSize) throw Error(
					'Invalid parameter: "pageNum or pageSize"');
				if (e.pageNum < 0 || e.pageSize < 0) throw Error(
					'"pageNum" should >= 0 and "pageSize" should >= 0');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.userId,
					a = r.accessToken,
					s = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/users/").concat(i,
							"/presence/sublist?pageNum=").concat(e.pageNum, "&pageSize=").concat(e
							.pageSize),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + a,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getSubscribedPresenceList:", e), $.call(this, s).then((function(
				e) {
					return e.data = {
						result: null == e ? void 0 : e.result
					}, e
				}))
			}
			var ha = pa;

			function fa(e) {
				if (!Array.isArray(e.usernames)) throw Error('Invalid parameter: "usernames"');
				if (!e.usernames.length) throw Error('"usernames" can not be empty');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = {
						usernames: e.usernames
					},
					o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.userId,
					s = o.accessToken,
					c = {
						url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/users/").concat(a,
							"/presence"),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(r),
						headers: {
							Authorization: "Bearer " + s,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getPresenceStatus:", e), $.call(this, c).then((function(e) {
					return e.data = {
						result: null == e ? void 0 : e.result
					}, e
				}))
			}

			function ma(e) {
				if (!(e.options instanceof Object)) throw Error('Invalid parameter: "options"');
				var t = e.options.paramType;
				if ("number" != typeof t || t < 0 || t > 2) throw Error(
					'Invalid parameter: "options of paramType"');
				if (0 === t) {
					if ("string" != typeof e.options.remindType) throw Error(
						'Invalid parameter: "options of remindType"')
				} else if (1 === t) {
					if ("number" != typeof e.options.duration) throw Error(
						'Invalid parameter: "options of duration"')
				} else if (2 === t) {
					var r = e.options,
						o = r.startTime,
						n = r.endTime;
					if (!(o instanceof Object && Object.keys(o).length)) throw Error(
						'Invalid parameter: "options of startTime"');
					if (!o.hours || "number" != typeof o.hours || !o.minutes || "number" != typeof o
						.minutes) throw Error(
						'Invalid parameter: "options of startTime of hours or minutes"');
					if (!(n instanceof Object && Object.keys(n).length)) throw Error(
						'Invalid parameter: "options of endTime"');
					if (!n.hours || "number" != typeof n.hours || !n.minutes || "number" != typeof n
						.minutes) throw Error(
						'Invalid parameter: "options of endTime of hours or minutes"')
				}
				if (!mr.call(this)) {
					var i = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(i)
				}
				var a = this.context,
					s = a.accessToken,
					c = a.orgName,
					l = a.appName,
					u = a.userId,
					p = {};
				switch (t) {
					case 0:
						p = {
							type: e.options.remindType
						};
						break;
					case 1:
						p = {
							ignoreDuration: e.options.duration
						};
						break;
					case 2:
						var h = e.options;
						o = h.startTime, n = h.endTime, p = {
							ignoreInterval: "".concat(o.hours, ":").concat(o.minutes, "-").concat(n
								.hours, ":").concat(n.minutes)
						}
				}
				var f = {
					url: "".concat(this.apiUrl, "/").concat(c, "/").concat(l, "/users/").concat(u,
						"/notification/user/").concat(u),
					type: "PUT",
					dataType: "json",
					data: JSON.stringify(p),
					headers: {
						Authorization: "Bearer " + s,
						"Content-Type": "application/json"
					},
					success: e.success,
					error: e.error
				};
				return x.debug("Call setSilentModeForAll:", e), $.call(this, f)
			}

			function ga(e) {
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.accessToken,
					n = r.orgName,
					i = r.appName,
					a = r.userId,
					s = {
						url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/users/").concat(a,
							"/notification/user/").concat(a),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + o,
							"Content-Type": "application/json"
						},
						success: null == e ? void 0 : e.success,
						error: null == e ? void 0 : e.error
					};
				return x.debug("Call getSilentModeForAll:", e), $.call(this, s)
			}

			function Ea(e) {
				if ("string" != typeof e.conversationId || !e.conversationId) throw Error(
					'Invalid parameter: "conversationId"');
				if ("string" != typeof e.type || !e.type) throw Error('Invalid parameter: "type"');
				if (!(e.options instanceof Object)) throw Error('Invalid parameter: "options"');
				var t = e.options.paramType;
				if ("number" != typeof t || t < 0 || t > 2) throw Error(
					'Invalid parameter: "options of paramType"');
				if (0 === t) {
					if ("string" != typeof e.options.remindType) throw Error(
						'Invalid parameter: "options of remindType"')
				} else if (1 === t) {
					if ("number" != typeof e.options.duration) throw Error(
						'Invalid parameter: "options of duration"')
				} else if (2 === t) {
					var r = e.options,
						o = r.startTime,
						n = r.endTime;
					if (!(o instanceof Object && Object.keys(o).length)) throw Error(
						'Invalid parameter: "options of startTime"');
					if (!o.hours || "number" != typeof o.hours || !o.minutes || "number" != typeof o
						.minutes) throw Error(
						'Invalid parameter: "options of startTime of hours or minutes"');
					if (!(n instanceof Object && Object.keys(n).length)) throw Error(
						'Invalid parameter: "options of endTime"');
					if (!n.hours || "number" != typeof n.hours || !n.minutes || "number" != typeof n
						.minutes) throw Error(
						'Invalid parameter: "options of endTime of hours or minutes"')
				}
				if (!mr.call(this)) {
					var i = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(i)
				}
				var a = this.context,
					s = a.accessToken,
					c = a.orgName,
					l = a.appName,
					u = a.userId,
					p = "chatgroup",
					h = {};
				switch (t) {
					case 0:
						h = {
							type: e.options.remindType
						};
						break;
					case 1:
						h = {
							ignoreDuration: e.options.duration
						};
						break;
					case 2:
						var f = e.options;
						o = f.startTime, n = f.endTime, h = {
							ignoreInterval: "".concat(o.hours, ":").concat(o.minutes, "-").concat(n
								.hours, ":").concat(n.minutes)
						}
				}
				"singleChat" === e.type && (p = "user");
				var g = {
					url: "".concat(this.apiUrl, "/").concat(c, "/").concat(l, "/users/").concat(u,
						"/notification/").concat(p, "/").concat(e.conversationId),
					type: "PUT",
					dataType: "json",
					data: JSON.stringify(h),
					headers: {
						Authorization: "Bearer " + s,
						"Content-Type": "application/json"
					},
					success: e.success,
					error: e.error
				};
				return x.debug("Call setSilentModeForConversation:", e), $.call(this, g)
			}

			function ya(e) {
				if ("string" != typeof e.conversationId || !e.conversationId) throw Error(
					'Invalid parameter: "conversationId"');
				if ("string" != typeof e.type || !e.type) throw Error('Invalid parameter: "type"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.accessToken,
					n = r.orgName,
					i = r.appName,
					a = r.userId,
					s = "chatgroup";
				"singleChat" === e.type && (s = "user");
				var c = {
					url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/users/").concat(a,
						"/notification/").concat(s, "/").concat(e.conversationId),
					type: "PUT",
					dataType: "json",
					data: JSON.stringify({
						type: "DEFAULT"
					}),
					headers: {
						Authorization: "Bearer " + o,
						"Content-Type": "application/json"
					},
					success: e.success,
					error: e.error
				};
				return x.debug("Call clearRemindTypeForConversation:", e), $.call(this, c)
			}

			function va(e) {
				if ("string" != typeof e.conversationId || !e.conversationId) throw Error(
					'Invalid parameter: "conversationId"');
				if ("string" != typeof e.type || !e.type) throw Error('Invalid parameter: "type"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.accessToken,
					n = r.orgName,
					i = r.appName,
					a = r.userId,
					s = "chatgroup";
				"singleChat" === e.type && (s = "user");
				var c = {
					url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/users/").concat(a,
						"/notification/").concat(s, "/").concat(e.conversationId),
					type: "GET",
					dataType: "json",
					headers: {
						Authorization: "Bearer " + o,
						"Content-Type": "application/json"
					},
					success: e.success,
					error: e.error
				};
				return x.debug("Call getSilentModeForConversation:", e), $.call(this, c)
			}

			function _a(e) {
				if (!Array.isArray(e.conversationList)) throw Error(
					'Invalid parameter: "conversationList"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.accessToken,
					n = r.orgName,
					i = r.appName,
					a = r.userId,
					s = [],
					c = [];
				e.conversationList.forEach((function(e) {
					"singleChat" === e.type ? s.push(e.id) : c.push(e.id)
				}));
				var l = s.length ? s.join(",") : "",
					u = c.length ? c.join(",") : "",
					p = {
						url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/users/").concat(a,
							"/notification?user=").concat(l, "&group=").concat(u),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + o,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call getSilentModeForConversations:", e), $.call(this, p)
			}

			function Ta(e) {
				if ("string" != typeof e.language || !e.language) throw Error(
					'Invalid parameter: "language"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = {
						translationLanguage: e.language
					},
					o = this.context,
					n = o.accessToken,
					i = o.orgName,
					a = o.appName,
					s = o.userId,
					c = {
						url: "".concat(this.apiUrl, "/").concat(i, "/").concat(a, "/users/").concat(s,
							"/notification/language"),
						type: "PUT",
						dataType: "json",
						data: JSON.stringify(r),
						headers: {
							Authorization: "Bearer " + n,
							"Content-Type": "application/json"
						},
						success: e.success,
						error: e.error
					};
				return x.debug("Call setPushPerformLanguage:", e), $.call(this, c)
			}

			function Ra(e) {
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.accessToken,
					n = r.orgName,
					i = r.appName,
					a = r.userId,
					s = {
						url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/users/").concat(a,
							"/notification/language"),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + o,
							"Content-Type": "application/json"
						},
						success: null == e ? void 0 : e.success,
						error: null == e ? void 0 : e.error
					};
				return x.debug("Call getPushPerformLanguage:", e), $.call(this, s)
			}
			var Oa = function(e, t, r, o) {
					return new(r || (r = Promise))((function(n, i) {
						function a(e) {
							try {
								c(o.next(e))
							} catch (e) {
								i(e)
							}
						}

						function s(e) {
							try {
								c(o.throw(e))
							} catch (e) {
								i(e)
							}
						}

						function c(e) {
							var t;
							e.done ? n(e.value) : (t = e.value, t instanceof r ? t : new r((
								function(e) {
									e(t)
								}))).then(a, s)
						}
						c((o = o.apply(e, t || [])).next())
					}))
				},
				Ia = function(e, t) {
					var r, o, n, i, a = {
						label: 0,
						sent: function() {
							if (1 & n[0]) throw n[1];
							return n[1]
						},
						trys: [],
						ops: []
					};
					return i = {
						next: s(0),
						throw: s(1),
						return: s(2)
					}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
						return this
					}), i;

					function s(i) {
						return function(s) {
							return function(i) {
								if (r) throw new TypeError("Generator is already executing.");
								for (; a;) try {
									if (r = 1, o && (n = 2 & i[0] ? o.return : i[0] ? o
											.throw || ((n = o.return) && n.call(o), 0) : o
											.next) && !(n = n.call(o, i[1])).done) return n;
									switch (o = 0, n && (i = [2 & i[0], n.value]), i[0]) {
										case 0:
										case 1:
											n = i;
											break;
										case 4:
											return a.label++, {
												value: i[1],
												done: !1
											};
										case 5:
											a.label++, o = i[1], i = [0];
											continue;
										case 7:
											i = a.ops.pop(), a.trys.pop();
											continue;
										default:
											if (!((n = (n = a.trys).length > 0 && n[n
														.length - 1]) || 6 !== i[0] && 2 !==
													i[0])) {
												a = 0;
												continue
											}
											if (3 === i[0] && (!n || i[1] > n[0] && i[1] <
													n[3])) {
												a.label = i[1];
												break
											}
											if (6 === i[0] && a.label < n[1]) {
												a.label = n[1], n = i;
												break
											}
											if (n && a.label < n[2]) {
												a.label = n[2], a.ops.push(i);
												break
											}
											n[2] && a.ops.pop(), a.trys.pop();
											continue
									}
									i = t.call(e, a)
								} catch (e) {
									i = [6, e], o = 0
								} finally {
									r = n = 0
								}
								if (5 & i[0]) throw i[1];
								return {
									value: i[0] ? i[1] : void 0,
									done: !0
								}
							}([i, s])
						}
					}
				};

			function Sa(e) {
				if ("string" != typeof e.name || "" === e.name) throw Error("Invalid parameter name: "
					.concat(e.name));
				if ("string" != typeof e.messageId || "" === e.messageId) throw Error(
					"Invalid parameter messageId: ".concat(e.messageId));
				if ("string" != typeof e.parentId || "" === e.parentId) throw Error(
					"Invalid parameter parentId: ".concat(e.parentId));
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = {
						name: e.name,
						msg_id: e.messageId,
						group_id: e.parentId,
						owner: this.user
					},
					c = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/thread?resource=")
							.concat(a.clientResource),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(s),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, c).then((function(e) {
					var t = e.data.thread_id;
					return e.data = {
						chatThreadId: t
					}, e
				}))
			}

			function Ca(e) {
				if ("string" != typeof e.chatThreadId || "" === e.chatThreadId) throw Error(
					"Invalid parameter chatThreadId: ".concat(e.chatThreadId));
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/thread/").concat(e
							.chatThreadId, "/user/").concat(this.user, "/join?resource=").concat(a
							.clientResource),
						type: "POST",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, s).then((function(e) {
					var t = e.data.detail;
					return t.messageId = t.msgId, t.parentId = t.groupId, delete t.msgId,
						delete t.groupId, e
				}))
			}

			function Aa(e) {
				return Oa(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s;
					return Ia(this, (function(c) {
						switch (c.label) {
							case 0:
								if ("string" != typeof e.chatThreadId || "" ===
									e.chatThreadId) throw Error(
									"Invalid parameter chatThreadId: "
									.concat(e.chatThreadId));
								return mr.call(this) ? (r = this.context, o = r
									.orgName, n = r.appName, i = r
									.accessToken, a = r.jid, s = {
										url: "".concat(this.apiUrl, "/")
											.concat(o, "/").concat(n,
												"/thread/").concat(e
												.chatThreadId, "/user/")
											.concat(this.user,
												"/quit?resource=").concat(a
												.clientResource),
										type: "DELETE",
										dataType: "json",
										headers: {
											Authorization: "Bearer " + i,
											"Content-Type": "application/json"
										}
									}, [4, $.call(this, s)]) : (t = m
									.create({
										type: d.REST_PARAMS_STATUS,
										message: "appkey or token error"
									}), [2, Promise.reject(t)]);
							case 1:
								return c.sent(), [2]
						}
					}))
				}))
			}

			function Na(e) {
				return Oa(this, void 0, void 0, (function() {
					var t, r, o, n, i, a, s;
					return Ia(this, (function(c) {
						switch (c.label) {
							case 0:
								if ("string" != typeof e.chatThreadId || "" ===
									e.chatThreadId) throw Error(
									"Invalid parameter chatThreadId: "
									.concat(e.chatThreadId));
								return mr.call(this) ? (r = this.context, o = r
									.orgName, n = r.appName, i = r
									.accessToken, a = r.jid, s = {
										url: "".concat(this.apiUrl, "/")
											.concat(o, "/").concat(n,
												"/thread/").concat(e
												.chatThreadId, "?resource=")
											.concat(a.clientResource),
										type: "DELETE",
										dataType: "json",
										headers: {
											Authorization: "Bearer " + i,
											"Content-Type": "application/json"
										}
									}, [4, $.call(this, s)]) : (t = m
									.create({
										type: d.REST_PARAMS_STATUS,
										message: "appkey or token error"
									}), [2, Promise.reject(t)]);
							case 1:
								return c.sent(), [2]
						}
					}))
				}))
			}

			function Ma(e) {
				if ("string" != typeof e.chatThreadId || "" === e.chatThreadId) throw Error(
					"Invalid parameter chatThreadId: ".concat(e.chatThreadId));
				if ("string" != typeof e.name || "" === e.name) throw Error("Invalid parameter name: "
					.concat(e.name));
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = {
						name: e.name
					},
					c = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/thread/").concat(e
							.chatThreadId, "?resource=").concat(a.clientResource),
						type: "PUT",
						dataType: "json",
						data: JSON.stringify(s),
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, c)
			}

			function ba(e) {
				if ("string" != typeof e.chatThreadId || "" === e.chatThreadId) throw Error(
					"Invalid parameter chatThreadId: ".concat(e.chatThreadId));
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						limit: e.pageSize || 20,
						cursor: e.cursor || ""
					},
					s = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/thread/").concat(e
							.chatThreadId, "/users"),
						type: "GET",
						dataType: "json",
						data: a,
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, s)
			}

			function Ua(e) {
				if ("string" != typeof e.chatThreadId || "" === e.chatThreadId) throw Error(
					"Invalid parameter chatThreadId: ".concat(e.chatThreadId));
				if ("string" != typeof e.username || "" === e.username) throw Error(
					"Invalid parameter username: ".concat(e.username));
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = r.jid,
					s = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/thread/").concat(e
							.chatThreadId, "/users/").concat(e.username, "?resource=").concat(a
							.clientResource),
						type: "DELETE",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, s)
			}

			function Pa(e) {
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						limit: e.pageSize || 20,
						cursor: e.cursor || ""
					},
					s = {
						url: e.parentId ? "".concat(this.apiUrl, "/").concat(o, "/").concat(n,
								"/threads/chatgroups/").concat(e.parentId, "/user/").concat(this.user) :
							"".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/threads/user/")
							.concat(this.user),
						type: "GET",
						dataType: "json",
						data: a,
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, s).then((function(e) {
					var t = e.entities;
					return null == t || t.forEach((function(e) {
						e.parentId = e.groupId, e.messageId = e.msgId, delete e
							.groupId, delete e.msgId
					})), e
				}))
			}

			function ka(e) {
				if ("string" != typeof e.parentId || "" === e.parentId) throw Error(
					"Invalid parameter parentId: ".concat(e.parentId));
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						cursor: e.cursor || "",
						limit: e.pageSize || 20
					},
					s = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n,
							"/threads/chatgroups/").concat(e.parentId),
						type: "GET",
						dataType: "json",
						data: a,
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, s).then((function(e) {
					var t = e.entities;
					return null == t || t.forEach((function(e) {
						e.parentId = e.groupId, e.messageId = e.msgId, delete e
							.groupId, delete e.msgId
					})), e
				}))
			}

			function wa(e) {
				var t = this;
				if (!Array.isArray(e.chatThreadIds)) throw Error("Invalid parameter chatThreadIds: "
					.concat(e.chatThreadIds));
				if (!mr.call(this)) {
					var r = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(r)
				}
				var o = this.context,
					n = o.orgName,
					i = o.appName,
					a = o.accessToken,
					s = {
						threadIds: e.chatThreadIds
					},
					c = {
						url: "".concat(this.apiUrl, "/").concat(n, "/").concat(i, "/thread/message"),
						type: "POST",
						dataType: "json",
						data: JSON.stringify(s),
						headers: {
							Authorization: "Bearer " + a,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, c).then((function(e) {
					return La.call(t, e)
				}))
			}

			function La(e) {
				var t = this,
					r = e.entities;
				return null == r || r.forEach((function(e) {
					e.chatThreadId = e.thread_id, e.last_message && "{}" !== JSON.stringify(
							e.last_message) ? e.lastMessage = ge.call(t, e.last_message) : e
						.lastMessage = e.last_message, delete e.thread_id, delete e
						.last_message
				})), e
			}

			function Da(e) {
				if ("string" != typeof e.chatThreadId || "" === e.chatThreadId) throw Error(
					"Invalid parameter chatThreadId: ".concat(e.chatThreadId));
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = {
						url: "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/thread/").concat(e
							.chatThreadId),
						type: "GET",
						dataType: "json",
						headers: {
							Authorization: "Bearer " + i,
							"Content-Type": "application/json"
						}
					};
				return $.call(this, a).then((function(e) {
					return e.data.affiliationsCount = e.data.affiliations_count, e.data
						.messageId = e.data.msgId, e.data.parentId = e.data.groupId,
						delete e.data.affiliations_count, delete e.data.msgId, delete e.data
						.groupId, e
				}))
			}

			function xa() {
				if (!mr.call(this)) {
					var e = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(e)
				}
				var t = this.context,
					r = t.orgName,
					o = t.appName,
					n = t.accessToken,
					i = {
						url: "".concat(this.apiUrl, "/").concat(r, "/").concat(o, "/users/").concat(this
							.user, "/translate/support/language"),
						dataType: "json",
						type: "GET",
						headers: {
							Authorization: "Bearer " + n
						}
					};
				return x.debug("Call getSupportedLanguages"), $.call(this, i)
			}

			function Ga(e) {
				if ("string" != typeof e.text || "" === e.text) throw Error(
				'Invalid parameter: "text"');
				if (!Array.isArray(e.languages)) throw Error('Invalid parameter: "language"');
				if (!mr.call(this)) {
					var t = m.create({
						type: d.REST_PARAMS_STATUS,
						message: "appkey or token error"
					});
					return Promise.reject(t)
				}
				var r = this.context,
					o = r.orgName,
					n = r.appName,
					i = r.accessToken,
					a = "".concat(this.apiUrl, "/").concat(o, "/").concat(n, "/users/").concat(this
						.user, "/translate"),
					s = {
						text: e.text,
						to: e.languages
					},
					c = {
						url: a,
						dataType: "json",
						type: "POST",
						data: JSON.stringify(s),
						headers: {
							Authorization: "Bearer " + i
						}
					};
				return x.debug("Call translateMessage"), $.call(this, c)
			}
			var Ba = function() {
					return Ba = Object.assign || function(e) {
						for (var t, r = 1, o = arguments.length; r < o; r++)
							for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t,
								n) && (e[n] = t[n]);
						return e
					}, Ba.apply(this, arguments)
				},
				Ha = function(e, t) {
					var r, o, n, i, a = {
						label: 0,
						sent: function() {
							if (1 & n[0]) throw n[1];
							return n[1]
						},
						trys: [],
						ops: []
					};
					return i = {
						next: s(0),
						throw: s(1),
						return: s(2)
					}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
						return this
					}), i;

					function s(i) {
						return function(s) {
							return function(i) {
								if (r) throw new TypeError("Generator is already executing.");
								for (; a;) try {
									if (r = 1, o && (n = 2 & i[0] ? o.return : i[0] ? o
											.throw || ((n = o.return) && n.call(o), 0) : o
											.next) && !(n = n.call(o, i[1])).done) return n;
									switch (o = 0, n && (i = [2 & i[0], n.value]), i[0]) {
										case 0:
										case 1:
											n = i;
											break;
										case 4:
											return a.label++, {
												value: i[1],
												done: !1
											};
										case 5:
											a.label++, o = i[1], i = [0];
											continue;
										case 7:
											i = a.ops.pop(), a.trys.pop();
											continue;
										default:
											if (!((n = (n = a.trys).length > 0 && n[n
														.length - 1]) || 6 !== i[0] && 2 !==
													i[0])) {
												a = 0;
												continue
											}
											if (3 === i[0] && (!n || i[1] > n[0] && i[1] <
													n[3])) {
												a.label = i[1];
												break
											}
											if (6 === i[0] && a.label < n[1]) {
												a.label = n[1], n = i;
												break
											}
											if (n && a.label < n[2]) {
												a.label = n[2], a.ops.push(i);
												break
											}
											n[2] && a.ops.pop(), a.trys.pop();
											continue
									}
									i = t.call(e, a)
								} catch (e) {
									i = [6, e], o = 0
								} finally {
									r = n = 0
								}
								if (5 & i[0]) throw i[1];
								return {
									value: i[0] ? i[1] : void 0,
									done: !0
								}
							}([i, s])
						}
					}
				},
				ja = de.getEnvInfo(),
				Fa = "web" === ja.platform,
				Wa = function() {},
				Ka = {
					CLOSED: 3,
					CLOSING: 2,
					CONNECTING: 0,
					OPEN: 1
				},
				qa = function() {
					function r(o) {
						var l, u;
						if (this.name = "connection", this.max_cache_length = 100, this
							.enableReportLogs = !1, this._reportLogs = !1, this._reportInterval = 3e5,
							this.unSyncQueue = [], this.lastHeartbeat = Date.now(), this.isDebug = o
							.isDebug || !1, this.isReport = !1, this.enableReportLogs = o
							.enableReportLogs || !1, this.uploadPartEnable = !0, this.isHttpDNS =
							void 0 === o.isHttpDNS ? Fa : o.isHttpDNS, this.heartBeatWait = o
							.heartBeatWait || 3e4, this.autoReconnectNumMax = o.autoReconnectNumMax ||
							5, this.refreshDNSIntervals = this.autoReconnectNumMax < 5 ? this
							.autoReconnectNumMax : 5, this.delivery = o.delivery || !1, this
							.disconnectedReason = void 0, this.loginInfoCustomExt = void 0, this
							.dnsArr = ["https://rs.easemob.com", "https://rs.chat.agora.io",
								"http://59.110.89.59", "http://39.97.193.190", "http://39.97.193.187"
							], this.dnsIndex = 0, this.dnsTotal = this.dnsArr.length, this
							.restHosts = [], this.restTotal = 0, this.restIndex = 0, this.hostIndex = 0,
							this.socketHost = [], this.hostTotal = 0, this.times = 1, this
							.autoReconnectNumTotal = 0, this.domain = "easemob.com", this.appKey = o
							.appKey, this.appName = "", this.orgName = "", this.token = "", this
							.grantType = "", this.apiUrl = o.apiUrl || "", this.url = o.url || "", this
							.https = o.https || "undefined" != typeof window && "https:" === (null === (
								l = window.location) || void 0 === l ? void 0 : l.protocol), this
							.version = "4.8.1", this.deviceId = o.deviceId || "webim", this
							.isFixedDeviceId = null === (u = o.isFixedDeviceId) || void 0 === u || u,
							this.osType = 16, this.useOwnUploadFun = o.useOwnUploadFun || !1, this
							.compressType = [0], this.encryptType = [0], this.clientResource = "", this
							.expiresIn = 0, this.expirationTime = 0, this.useReplacedMessageContents = o
							.useReplacedMessageContents || !1, this.logOut = !0, this.context = {
								jid: {
									appKey: "",
									clientResource: "",
									domain: "easemob.com",
									name: ""
								},
								userId: "",
								appKey: "",
								status: 0,
								restTokenData: "",
								appName: "",
								orgName: "",
								root: {},
								accessToken: ""
							}, this._msgHash = {}, this._msgPromiseHash = {}, this._queues = [], this
							._load_msg_cache = [], this.unMSyncSendMsgMap = new Map, this.mr_cache = {},
							this.closeInfo = null, this.reconnecting = !1, "string" != typeof this
							.appKey || 2 !== this.appKey.split("#").length) throw Error(
							"Illegal appKey: ".concat(this.appKey));
						this.devInfos = this.appKey.split("#"), this.orgName = this.devInfos[0], this
							.appName = this.devInfos[1], this.listen = Qt.bind(this), this.mSync = this
							.usePlugin(Vt), this.eventHandler = this.usePlugin(Xt), Object.assign(r
								.prototype, e), Object.assign(r.prototype, t), Object.assign(r
								.prototype, n), Object.assign(r.prototype, i), Object.assign(r
								.prototype, a), Object.assign(r.prototype, s), Object.assign(r
								.prototype, c), this.dataReport = new pr({
								appkey: this.appKey,
								org: this.orgName,
								sdkVersion: this.version,
								deviceId: this.deviceId,
								isReport: this.isReport
							});
						var d = 0,
							p = this;
						Object.defineProperty(de, "ajaxUnconventionalErrorTimes", {
							set: function(e) {
								0 !== e && (x.debug("rest api request fail times: ".concat(
									e)), (d = e) % 5 == 0 && p.isHttpDNS && (x
									.debug(
										"refresh dns config when rest request fail."
										), Za.call(p, "refresh", {}, {})))
							},
							get: function() {
								return d
							}
						}), x.debug("init SDK: Conn ".concat(this.version, " ").concat(ja.platform))
					}
					return r.prototype.usePlugin = function(e, t) {
							if (!t) return new e(this);
							this[t] = new e(this)
						}, r.prototype.listen = function(e) {}, r.prototype.addEventHandler = function(
							e, t) {}, r.prototype.removeEventHandler = function(e) {}, r.prototype
						.registerUser = function(e) {
							var t = this;
							return new Promise((function(r, o) {
								var n = t.dataReport.geOperateFun({
									uid: e.username,
									operationName: E.REGISTER
								});
								if (t.isHttpDNS) {
									t.dnsIndex = 0;
									var i = Ba(Ba({}, e), {
										user: e.username,
										pwd: e.password,
										promise: {
											resolve: r,
											reject: o
										}
									});
									Za.call(t, "signup", i, {
										rpt: n
									})
								} else i = Ba(Ba({}, e), {
									promise: {
										resolve: r,
										reject: o
									}
								}), za.call(t, i, {
									rpt: n
								})
							}))
						}, r.prototype.open = function(e) {
							var t = this;
							if (x.debug("open", e.user), "web" === ja.platform) {
								var r = de.detectBrowser();
								x.debug("browser", r)
							}
							return new Promise((function(r, o) {
								if (Qa.call(t, e)) {
									e.accessToken && (t.token = e.accessToken);
									var n = Ba(Ba({}, e), {
											promise: {
												resolve: r,
												reject: o
											}
										}),
										i = t.dataReport.geOperateFun({
											uid: e.user,
											operationName: E.LOGIN
										});
									if (t.isHttpDNS) Za.call(t, "login", n, {
										rpt: i
									});
									else {
										if ("web" !== ja.platform && t.enableReportLogs)
											return void t.getDNS().then((function() {
												Va.call(t, n, {
													rpt: i
												})
											}));
										Va.call(t, n, {
											rpt: i
										})
									}
								}
							}))
						}, r.prototype.getDNS = function() {
							var e = this,
								t = {
									url: this.dnsArr[this.dnsIndex] + "/easemob/server.json",
									dataType: "json",
									type: "GET",
									data: {
										app_key: this.appKey
									},
									success: function(t) {
										var r = t.enableReportLogs,
											o = t.reportInterval;
										e._reportLogs = "true" === r, e._reportInterval = Number(
											o || 3e5)
									} || Wa,
									error: function() {
										x.debug("getHttpDNS fail: " + e.dnsIndex), e.dnsIndex++, e
											.dnsIndex < e.dnsTotal && e.getDNS()
									} || Wa
								};
							return de.ajax(t).catch((function(e) {
								console.warn(e)
							}))
						}, r.prototype.isOpened = function() {
							return this.sock && this.sock.readyState === Ka.OPEN || !1
						}, r.prototype.close = function() {
							var e, t, r;
							x.debug("call close"), x._stopReportLogs(), this.logOut = !0, this
								.disconnectedReason = void 0, this.reconnecting = !1, this.context
								.status = d.STATUS_CLOSING, this.sock && this.sock.close(), null === (
									e = this.unMSyncSendMsgMap) || void 0 === e || e.clear(), this
								.stopHeartBeat(), this.rejectMessage(), this.context.status = d
								.STATUS_CLOSED, this._load_msg_cache = [], this._queues = [], this
								.unSyncQueue = [], this._msgHash = {}, this.mr_cache = {}, this.token =
								"", this.context.accessToken = "", this.clearTokenTimeout(), null === (
									r = null === (t = null == this ? void 0 : this._localCache) ||
									void 0 === t ? void 0 : t.getInstance()) || void 0 === r || r
								.close()
						}, r.prototype.downloadAndParseCombineMessage = function(e) {
							var t = this,
								r = e.url,
								o = e.secret;
							return new Promise((function(e, n) {
								var i, a, s = de.getEnvInfo(),
									c = "web" !== s.platform && "node" !== s.platform &&
									"quick_app" !== s.platform && (null === (a = null === (
											i = s.global) || void 0 === i ? void 0 : i
										.canIUse) || void 0 === a ? void 0 : a.call(i,
										"getFileSystemManager")),
									l = function(r) {
										var o = function(e) {
												n({
													type: d.PARSE_FILE_ERROR,
													message: "Read file failed",
													data: e
												})
											},
											i = function(r) {
												return o = t, i = void 0, s = function() {
													var t, o, i, a, s, l, u, p, h, f, m,
														g, E;
													return Ha(this, (function(y) {
														switch (y.label) {
															case 0:
																for (t = c ?
																	new Uint8Array(
																		r
																		.data
																		) :
																	new Uint8Array(
																		r
																		.target
																		.result
																		),
																	o = 0,
																	i = 0,
																	a = 2,
																	s = t
																	.subarray(
																		o,
																		o +
																		a),
																	l = de
																	.Uint8ArrayToString(
																		s),
																	x.debug(
																		"file header:",
																		l),
																	i += a,
																	u = 0,
																	p =
																	2; p < t
																	.length -
																	1; p++)
																	p % 2 ==
																	1 && (
																		u ^=
																		t[p]
																		);
																if (h = t
																	.subarray(
																		t
																		.length -
																		1, t
																		.length
																		), x
																	.debug(
																		"checkResult:",
																		u,
																		h[
																		0] ===
																		u),
																	h[0] !==
																	u)
																	return [2,
																		n({
																			type: d
																				.PARSE_FILE_ERROR,
																			message: "File verification failed"
																		})
																	];
																if ("cm" !==
																	l)
																	return [3,
																		7
																	];
																y.label = 1;
															case 1:
																y.trys.push(
																		[1, 5, ,
																			6
																		]),
																	f = [],
																	m =
																	function() {
																		var e,
																			r,
																			n,
																			s;
																		return Ha(
																			this,
																			(function(
																				c
																				) {
																				switch (
																					c
																					.label
																					) {
																					case 0:
																						return o +=
																							a,
																							i +=
																							a =
																							4,
																							e =
																							t
																							.subarray(
																								o,
																								o +
																								a
																								),
																							o +=
																							a,
																							a =
																							e
																							.reduce(
																								(function(
																									t,
																									r,
																									o
																									) {
																									return t +
																										(r <<
																											8 *
																											(e.length -
																												o -
																												1
																												)
																											)
																								}),
																								0
																								),
																							i +=
																							a,
																							r =
																							t
																							.subarray(
																								o,
																								o +
																								a
																								),
																							n =
																							(n = g
																								.root
																								.lookup(
																									"easemob.pb.Meta"
																									)
																								)
																							.decode(
																								r
																								),
																							[4, Ke
																								.call(
																									g,
																									n,
																									0,
																									!
																									0,
																									!
																									0
																									)
																							];
																					case 1:
																						return s =
																							c
																							.sent(),
																							f
																							.push(
																								s
																								),
																							[
																								2]
																				}
																			})
																			)
																	}, g =
																	this, y
																	.label =
																	2;
															case 2:
																return i < t
																	.length -
																	1 ? [5,
																		m()
																	] : [3,
																		4
																	];
															case 3:
																return y
																	.sent(),
																	[3, 2];
															case 4:
																return [2,
																	e(f)
																];
															case 5:
																return E = y
																	.sent(),
																	n({
																		type: d
																			.PARSE_FILE_ERROR,
																		message: "Parse file failed",
																		data: E
																	}), [3,
																		6
																	];
															case 6:
																return [3,
																	8];
															case 7:
																return [2,
																	n({
																		type: d
																			.PARSE_FILE_ERROR,
																		message: "File verification failed"
																	})
																];
															case 8:
																return [2]
														}
													}))
												}, new((a = void 0) || (a = Promise))((
													function(e, t) {
														function r(e) {
															try {
																c(s.next(e))
															} catch (e) {
																t(e)
															}
														}

														function n(e) {
															try {
																c(s.throw(e))
															} catch (e) {
																t(e)
															}
														}

														function c(t) {
															var o;
															t.done ? e(t.value) : (
																o = t.value,
																o instanceof a ?
																o : new a((
																	function(
																		e) {
																		e(o)
																	}))).then(r,
																n)
														}
														c((s = s.apply(o, i || []))
															.next())
													}));
												var o, i, a, s
											};
										if (c) {
											var a = s.global.getFileSystemManager(),
												l = r.tempFilePath;
											a.readFile({
												filePath: l,
												success: i,
												fail: o
											})
										} else if (r instanceof Blob) {
											var u = new FileReader;
											u.readAsArrayBuffer(r), u.onerror = o, u
												.onload = i
										}
									},
									u = function(e) {
										n({
											type: d.WEBIM_DOWNLOADFILE_ERROR,
											message: "Download failed, please try again",
											data: e
										})
									};
								c ? s.global.downloadFile({
									url: r,
									success: l,
									fail: u
								}) : de.download.call(t, {
									url: r,
									headers: {
										Accept: "application/json"
									},
									onFileDownloadComplete: l,
									onFileDownloadError: u,
									secret: o,
									accessToken: t.context.accessToken
								})
							}))
						}, r.prototype.stopHeartBeat = function() {
							clearInterval(this.heartBeatID)
						}, r.prototype.clear = function() {
							this.restTotal = 0, this.restIndex = 0, this.hostIndex = 0, this.hostTotal =
								0
						}, r.prototype.heartBeat = function() {}, r.prototype.renewToken = function(e) {
							var t = this;
							return this.isOpened() ? this.getTokenExpireTimestamp(e).then((function(r) {
								var o = r.expire_timestamp,
									n = Date.now();
								return t.expirationTime = o, t.expiresIn = o - n, t.token =
									e, t.context.accessToken = e, t.clearTokenTimeout(), t
									.tokenExpireTimeCountDown(t.expiresIn), {
										status: !0,
										token: e,
										expire: o
									}
							})) : Promise.reject({
								status: !1
							})
						}, r.prototype.clearTokenTimeout = function() {
							x.info("clearTokenTimeout"), this.tokenWillExpireTimer && clearTimeout(this
									.tokenWillExpireTimer), this.tokenExpiredTimer && clearTimeout(this
									.tokenExpiredTimer), this.tokenWillExpireTimer = null, this
								.tokenExpiredTimer = null
						}, r.prototype.tokenExpireTimeCountDown = function(e) {
							var t = this;
							x.info("tokenExpireTimeCountDown", e), e > Math.pow(2, 31) - 1 && (e = Math
								.pow(2, 31) - 1), this.tokenWillExpireTimer = setTimeout((
						function() {
								var r;
								t.onTokenWillExpire && t.onTokenWillExpire(), null === (r =
									t.eventHandler) || void 0 === r || r.dispatch(
									"onTokenWillExpire"), x.info("onTokenWillExpire",
									Math.floor(e / 2))
							}), e / 2), this.tokenExpiredTimer = setTimeout((function() {
								var e;
								x.info("onTokenExpired", 0), t.onTokenExpired && t
									.onTokenExpired(), null === (e = t.eventHandler) ||
									void 0 === e || e.dispatch("onTokenExpired"), t.close()
							}), e)
						}, r.prototype.compareTokenExpireTime = function(e, t) {
							var r, o = Number(t) - Number(e);
							x.debug("compareTokenExpireTime", o), o <= this.expiresIn / 2 && o > 0 ? (
									this.onTokenWillExpire && this.onTokenWillExpire(), null === (r =
										this.eventHandler) || void 0 === r || r.dispatch(
										"onTokenWillExpire"), x.info("onTokenWillExpire", o)) : o <=
								0 && (this.closeByTokenExpired(), x.info("closeByTokenExpired", o))
						}, r.prototype.closeByTokenExpired = function() {
							var e;
							x.info("closed By TokenExpired"), this.onTokenExpired && this
								.onTokenExpired(), null === (e = this.eventHandler) || void 0 === e || e
								.dispatch("onTokenExpired"), this.close()
						}, r.prototype.rejectMessage = function() {
							var e = this,
								t = Object.keys(this._msgHash);
							if (t.length > 0) {
								var r = m.create({
									type: d.MESSAGE_WEBSOCKET_DISCONNECTED,
									message: "websocket disconnected"
								});
								t.forEach((function(t) {
									var o, n, i;
									(null === (o = e.unMSyncSendMsgMap) || void 0 === o ?
										void 0 : o.has(t)) || (e._msgHash[t]
										.reject instanceof Function && e._msgHash[t].reject(
											r), null === (i = null === (n = e
											._localCache) || void 0 === n ? void 0 : n
											.getInstance()) || void 0 === i || i
										.updateLocalMessage(t, {
											serverMsgId: t,
											status: Ee.FAIL
										}), e._msgHash[t].fail instanceof Function && e
										._msgHash[t].fail(r), delete e._msgHash[t])
								}))
							}
						}, r.prototype.resetConnState = function() {
							this.mSync.stopHeartBeat(), this.times = 1, this.autoReconnectNumTotal = 0,
								this.hostIndex = 0
						}, r.prototype.reconnect = function() {
							var e, t = this;
							this.sock.readyState !== Ka.CONNECTING && this.sock.readyState !== Ka
								.OPEN && (x.info("reconnect: time", this.times), x.info(
										"reconnect sock.readyState: ", this.sock.readyState), !1 ===
									this.reconnecting && (this.reconnecting = !0), null === (e = this
										.eventHandler) || void 0 === e || e.dispatch("onReconnecting"),
									this.rejectMessage(), this.isHttpDNS && (this.hostIndex < this
										.socketHost.length - 1 ? this.hostIndex++ : this.hostIndex =
										this.socketHost.length - 1), setTimeout((function() {
										t.sock.readyState !== Ka.OPEN && (x.info(
											"login sock.readyState: ", t.sock.readyState
											), t.sock.close(), Ya.call(t, {
											access_token: t.context.accessToken
										}), t.times++)
									}), 500 * this.times), this.autoReconnectNumTotal++)
						}, r.prototype.send = function(e) {
							return Promise.resolve(null)
						}, r.prototype.setLoginInfoCustomExt = function(e) {
							if (x.debug("setLoginInfoCustomExt", "params:", e), e) {
								if ("string" != typeof e) throw new Error("ext must be a string");
								if (e.length > 1024) throw new Error(
									"ext length must be less than 1024")
							}
							this.loginInfoCustomExt = e
						}, r._getSock = function() {}, r
				}();

			function za(e, t) {
				var r = this,
					o = t.rpt,
					n = t.isRetry,
					i = e.promise,
					a = this.apiUrl + "/" + this.orgName + "/" + this.appName + "/users",
					s = {
						requestName: y.RESISTER,
						requestUrl: a
					},
					c = e.error || Wa;
				if (!this.orgName && !this.appName) {
					var l = m.create({
						type: d.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR,
						message: "signup error"
					});
					c(l)
				}
				var u = {
					headers: {
						"Content-type": "application/json"
					},
					url: a,
					dataType: "json",
					data: JSON.stringify({
						username: e.username,
						password: e.password,
						nickname: e.nickname || ""
					}),
					success: function(t) {
						e.success && e.success(t);
						var r = Ba(Ba({}, t), {
							type: d.REQUEST_SUCCESS
						});
						i.resolve && i.resolve(r);
						var a = t.extraInfo,
							c = a.httpCode,
							l = a.elapse;
						o({
							isEndApi: !0,
							isRetry: n,
							data: Ba(Ba({}, {
								requestElapse: l,
								isSuccess: 1,
								code: c
							}), s)
						})
					},
					error: function(t) {
						var a = t.extraInfo,
							l = a.elapse,
							u = a.httpCode,
							d = a.errDesc;
						return o({
							isRetry: n,
							data: Ba(Ba({}, {
								requestElapse: l,
								isSuccess: 0,
								code: u,
								codeDesc: d
							}), s)
						}), r.isHttpDNS && r.restIndex + 1 < r.restTotal ? (r.restIndex++,
							es.call(r), za.call(r, e, {
								rpt: o,
								isRetry: n
							}), Promise.reject(t)) : (o({
							data: {
								isLastApi: 1,
								isSuccess: 0
							}
						}), r.clear(), i.reject && i.reject(t), c(t))
					}
				};
				return de.ajax(u).catch((function(e) {
					i.reject && i.reject(e)
				}))
			}

			function Va(e, t) {
				var r = this;
				if (Qa.call(this, e) && !this.isOpened()) {
					var o = t.rpt,
						n = t.isRetry;
					$a.call(this, e), this.user = e.user;
					var i = e.promise,
						a = this.context.appName,
						s = this.context.orgName,
						c = this.apiUrl + "/" + s + "/" + a + "/token";
					if (e.accessToken) this.grantType = "accessToken", this.token = e.accessToken, this
						.context.accessToken = e.accessToken, this.context.restTokenData = e
						.accessToken, i.resolve({
							accessToken: e.accessToken
						}), Ya.call(this, e, o), x.initReport({
							report: this._reportLogs,
							reportInterval: this._reportInterval,
							connection: this
						});
					else if (e.agoraToken) this.grantType = "agoraToken", this.token = e.agoraToken,
						this.context.accessToken = e.agoraToken, this.context.restTokenData = e
						.agoraToken, i.resolve({
							accessToken: e.agoraToken
						}), Ya.call(this, e, o), x.initReport({
							report: this._reportLogs,
							reportInterval: this._reportInterval,
							connection: this
						});
					else {
						this.grantType = "password";
						var l = {
								grant_type: "password",
								username: e.user,
								password: e.pwd,
								timestamp: +new Date
							},
							u = JSON.stringify(l),
							p = {
								headers: {
									"Content-type": "application/json"
								},
								url: c,
								dataType: "json",
								data: u,
								success: function(t) {
									x.debug("get token success"), "function" == typeof e.success &&
										e.success(t), r.token = t.access_token, r.context
										.restTokenData = t.access_token, r.context.accessToken = t
										.access_token, r.expiresIn = t.expires_in, i.resolve({
											accessToken: t.access_token,
											duration: t.expires_in
										});
									var a = t.extraInfo,
										s = a.httpCode,
										l = a.elapse,
										u = {
											requestName: y.LOGIN_BY_PWD,
											requestElapse: l,
											requestUrl: c,
											isSuccess: 1,
											code: s
										};
									o({
										isRetry: n,
										data: u
									}), Ya.call(r, t, o), x.initReport({
										report: r._reportLogs,
										reportInterval: r._reportInterval,
										connection: r
									})
								} || Wa,
								error: function(t) {
									var a, s = t.extraInfo,
										l = s.elapse,
										u = s.httpCode,
										p = s.errDesc,
										h = {
											requestName: y.LOGIN_BY_PWD,
											requestElapse: l,
											requestUrl: c,
											isSuccess: 0,
											code: u,
											codeDesc: p
										};
									if (o({
											isRetry: n,
											data: h
										}), r.isHttpDNS && r.restIndex + 1 < r.restTotal) return r
										.restIndex++, es.call(r), void Va.call(r, e, {
											rpt: o,
											isRetry: !0
										});
									o({
											data: {
												isLastApi: 1,
												isSuccess: 0
											}
										}), r.clear(), t.error && t.error_description ? (a = m
											.create({
												type: d.WEBIM_CONNCTION_OPEN_USERGRID_ERROR,
												message: t.error_description,
												data: t
											}), r.onError && r.onError(a)) : (a = m.create({
											type: d.WEBIM_CONNCTION_OPEN_ERROR,
											message: t.error_description,
											data: t
										}), r.onError && r.onError(a)), "function" == typeof e
										.error && e.error(a), i.reject(a)
								} || Wa,
								version: "4.3.0"
							};
						x.debug("start get token"), de.ajax(p).catch((function(e) {
							console.warn(e)
						}))
					}
					x.debug("grantType", this.grantType), de.listenNetwork(Ja.bind(this), Xa.bind(
						this)), de.listenBrowserVisibility((function() {
							x.debug("visibility true")
						}), (function() {
							x.debug("visibility false")
						}))
				}
			}

			function Ja() {
				var e;
				x.debug("online"), this.onOnline && this.onOnline(), null === (e = this.eventHandler) ||
					void 0 === e || e.dispatch("onOnline"), this.sock && 1 !== this.sock.readyState && (
						x.debug("sock.readyState:", this.sock.readyState), this.logOut || this
						.reconnecting || this.reconnect())
			}

			function Xa() {
				var e, t;
				x.debug("offline"), null === (e = this.sock) || void 0 === e || e.close(), this
					.onOffline && this.onOffline(), null === (t = this.eventHandler) || void 0 === t ||
					t.dispatch("onOffline")
			}

			function Ya(e, t) {
				var r = this,
					o = this._getSock();
				this.sock = o, x.debug("start connect ws");
				var n = function() {
						var e;
						x.debug("websocket onOpen"), t && t({
							data: {
								isLastApi: 1,
								isSuccess: 1,
								accessChannel: null === (e = r.socketHost[r.hostIndex]) ||
									void 0 === e ? void 0 : e.channel
							}
						});
						var n = de.flow([r.mSync.generateProvision, r.mSync.base64transform])();
						try {
							o.send(n)
						} catch (e) {
							var i = m.create({
								type: d.SDK_RUNTIME_ERROR,
								message: "send message error",
								data: e
							});
							r.onError && r.onError(i)
						}
					},
					i = function(e) {
						setTimeout((function() {
							var t, o, n, i, a, s, c, l, u, p, h, f;
							x.debug("websocket onClose", e), "zfb" !== ja.platform &&
								"dd" !== ja.platform || (r.sock.readyState = Ka.CLOSED);
							var g = 401 === (null == e ? void 0 : e.code) || 401 === (
								null === (t = r.closeInfo) || void 0 === t ? void 0 : t
								.code);
							if (r.logOut) r.clear(), r.resetConnState(), g && (x.debug(
									"websocket provision error"), r.closeInfo = null),
								null === (n = null === (o = null == r ? void 0 : r
										._localCache) || void 0 === o ? void 0 : o
									.getInstance()) || void 0 === n || n.close(), r
								.onClosed && r.onClosed(), null === (i = r.eventHandler) ||
								void 0 === i || i.dispatch("onDisconnected", r
									.disconnectedReason);
							else if (g) {
								x.debug("websocket provision error");
								var E = {
									type: d.WEBIM_CONNECTION_ERROR,
									message: "provision error",
									data: e
								};
								r.closeInfo = null, r.onError && r.onError(E), null === (a =
										r.eventHandler) || void 0 === a || a.dispatch(
										"onError", E), null === (c = null === (s = null ==
											r ? void 0 : r._localCache) || void 0 === s ?
										void 0 : s.getInstance()) || void 0 === c || c
									.close(), r.onClosed && r.onClosed(), null === (l = r
										.eventHandler) || void 0 === l || l.dispatch(
										"onDisconnected", r.disconnectedReason), r
									.resetConnState()
							} else if (r.autoReconnectNumTotal < r.autoReconnectNumMax) {
								r.reconnect();
								var y = {
									type: d.WEBIM_CONNCTION_DISCONNECTED,
									message: "websocket has been disconnected"
								};
								r.onError && r.onError(y), r.autoReconnectNumTotal % r
									.refreshDNSIntervals == 0 && "web" === ja.platform && r
									.isHttpDNS && (x.debug(
											"refresh dns config when websocket close"), Za
										.call(r, "refresh", {}, {}))
							} else null === (u = r.unMSyncSendMsgMap) || void 0 === u || u
								.clear(), r.rejectMessage(), y = {
									type: d.WEBIM_CONNCTION_DISCONNECTED,
									message: "websocket has been disconnected"
								}, r.disconnectedReason = m.create({
									type: d.WEBIM_CONNCTION_DISCONNECTED,
									message: "reconnection failed"
								}), r.onError && r.onError(y), null === (h = null === (p =
										null == r ? void 0 : r._localCache) || void 0 ===
									p ? void 0 : p.getInstance()) || void 0 === h || h
								.close(), r.onClosed && r.onClosed(), null === (f = r
									.eventHandler) || void 0 === f || f.dispatch(
									"onDisconnected", r.disconnectedReason), r
								.resetConnState(), r.reconnecting = !1, x.debug(
									"reconnect fail")
						}), 0)
					},
					a = function(e) {
						var t = r.mSync,
							o = t.decodeMSync,
							n = t.distributeMSync;
						de.flow([o, n])(e)
					};
				"web" === ja.platform ? (o.onopen = n, o.onclose = i, o.onmessage = a) : (o.onOpen(n), o
					.onMessage(a), o.onClose(i), "undefined" != typeof window && window.WebSocket ||
					o.onError((function(e) {
						var o, n, i, a, s;
						if (x.debug("mini program sock on error", e), r.sock.readyState !==
							Ka.CLOSED && (r.sock = Ba(Ba({}, r.sock), {
								close: r.sock.close,
								send: r.sock.send,
								readyState: Ka.CLOSED
							})), r.onError && r.onError({
								type: d.WEBIM_CONNECTION_ERROR,
								message: "on socket error",
								data: e
							}), !r.logOut)
							if (r.autoReconnectNumTotal < r.autoReconnectNumMax) x.debug(
									"sock.onError reconnect", r.autoReconnectNumTotal, r
									.autoReconnectNumMax), r.reconnect(), r
								.autoReconnectNumTotal % r.refreshDNSIntervals == 0 &&
								"web" === ja.platform && r.isHttpDNS && (x.debug(
									"refresh dns config when websocket error"), Za.call(
									r, "refresh", {}, {}));
							else {
								var c = {
									type: d.WEBIM_CONNCTION_DISCONNECTED,
									message: "websocket has been disconnected"
								};
								r.disconnectedReason = m.create({
										type: d.WEBIM_CONNCTION_DISCONNECTED,
										message: "reconnection failed"
									}), null === (o = r.unMSyncSendMsgMap) || void 0 ===
									o || o.clear(), r.rejectMessage(), r.onError && r
									.onError(c), null === (i = null === (n = null == r ?
											void 0 : r._localCache) || void 0 === n ?
										void 0 : n.getInstance()) || void 0 === i || i
									.close(), r.onClosed && r.onClosed(), null === (a = r
										.eventHandler) || void 0 === a || a.dispatch(
										"onDisconnected", r.disconnectedReason), r
									.resetConnState(), r.reconnecting = !1, x.debug(
										"reconnect fail")
							} t && t({
							data: {
								isLastApi: 1,
								isSuccess: 0,
								accessChannel: null === (s = r.socketHost[r
										.hostIndex]) || void 0 === s ? void 0 : s
									.channel
							}
						})
					})))
			}

			function Qa(e) {
				if (!e.user || "string" != typeof e.user) {
					var t = m.create({
						type: d.WEBIM_CONNCTION_USER_NOT_ASSIGN_ERROR,
						message: "the user cannot be empty"
					});
					return x.debug("open params error", t), this.onError && this.onError(t), !1
				}
				return !(2 !== this.devInfos.length || !this.orgName || !this.appName) || (t = m
			.create({
					type: d.WEBIM_CONNCTION_APPKEY_NOT_ASSIGN_ERROR,
					message: "the appKey is illegal"
				}), x.debug("open params error", t), this.onError && this.onError(t), !1)
			}

			function $a(e) {
				this.context.jid = {
						appKey: this.appKey,
						name: e.user,
						domain: this.domain,
						clientResource: this.clientResource
					}, this.context.root = this.root, this.context.userId = e.user, this.context
					.appKey = this.appKey, this.context.appName = this.appName, this.context.orgName =
					this.orgName
			}

			function Za(e, t, r) {
				var o = this,
					n = r.rpt,
					i = r.isRetry,
					a = this.dnsArr[this.dnsIndex] + "/easemob/server.json";
				x.debug("call getHttpDNS: " + this.dnsIndex);
				var s = {
					url: a,
					dataType: "json",
					type: "GET",
					data: {
						app_key: encodeURIComponent(this.appKey)
					},
					success: function(r) {
						x.debug("getHttpDNS success");
						var s = r.extraInfo,
							c = s.elapse,
							l = s.httpCode,
							u = {
								requestUrl: a,
								requestName: y.GET_DNS,
								requestElapse: c,
								isSuccess: 1,
								code: l
							};
						o._reportLogs = "true" === r.enableReportLogs, o._reportInterval =
							Number(r.reportInterval || 3e5), "true" === (null == r ? void 0 : r
								.enableDataReport) ? (o.dataReport.setIsCollectDt(!0), o
								.dataReport.setIsReportDt(!0)) : (o.dataReport.setIsReportDt(!
								1), o.dataReport.setIsCollectDt(!1)), "false" === (null == r ?
								void 0 : r.uploadinparts_enable) && (o.uploadPartEnable = !1),
							n && n({
								isRetry: i,
								data: u
							});
						var d = r.rest.hosts,
							p = o.https ? "https" : "http";
						if (x.info("httpType: " + p), !d) return Promise.reject(!1);
						for (var h = d.filter((function(e) {
								if (e.protocol === p) return e
							})), f = 0; f < h.length; f++)
							if (h[f].protocol === p) {
								var m = h[f];
								h.splice(f, 1), h.unshift(m)
							} o.restHosts = h, o.restTotal = h.length;
						var g = r["msync-ws"].hosts;
						if (!g) return Promise.reject(!1);
						var E = g.filter((function(e) {
							return e.protocol === p && e
						}));
						o.socketHost = E, o.hostTotal = E.length, es.call(o), "refresh" !== e &&
							("login" === e ? Va.call(o, t, {
								rpt: n
							}) : za.call(o, t, {
								rpt: n
							}))
					} || Wa,
					error: function(r) {
						var s = r.extraInfo,
							c = s.elapse,
							l = s.httpCode,
							u = s.errDesc,
							d = {
								requestUrl: a,
								requestName: y.GET_DNS,
								isSuccess: 0,
								code: l,
								codeDesc: u,
								requestElapse: c
							};
						n && n({
								isRetry: i,
								data: d
							}), x.debug("getHttpDNS fail: " + o.dnsIndex), o.dnsIndex++, o
							.dnsIndex < o.dnsTotal && Za.call(o, e, t, {
								rpt: n,
								isRetry: !0
							})
					} || Wa
				};
				return de.ajax(s).catch((function(e) {
					console.warn(e)
				}))
			}

			function es() {
				var e, t;
				if (this.restIndex > this.restTotal) return x.debug("restIndex > restTotal"), "";
				var r = "",
					o = this.restHosts[this.restIndex],
					n = o.domain,
					i = o.ip,
					a = o.port,
					s = this.https ? "https:" : "http:";
				return i && "undefined" != typeof window && "http:" === (null === (e = null ===
							window || void 0 === window ? void 0 : window.location) || void 0 === e ?
						void 0 : e.protocol) ? r = s + "//" + i + ":" + a : (r = s + "//" + n, a &&
						"80" !== a && "443" !== a && (r += ":".concat(a)), "undefined" ==
						typeof window || window.location || (r = "https://" + n), "undefined" !=
						typeof window && window.location && "file:" === (null === (t = window
							.location) || void 0 === t ? void 0 : t.protocol) && (r = "https://" + n)),
					"undefined" == typeof window && (r = s + "//" + n), this.apiUrl = r, r
			}
			var ts = de.getEnvInfo(),
				rs = ts.global;
			p.util.Long = f(), p.configure();
			var os = p.Root.fromJSON({
				nested: {
					easemob: {
						nested: {
							pb: {
								nested: {
									MessageBody: {
										fields: {
											type: {
												type: "Type",
												id: 1
											},
											from: {
												type: "JID",
												id: 2
											},
											to: {
												type: "JID",
												id: 3
											},
											contents: {
												rule: "repeated",
												type: "Content",
												id: 4
											},
											ext: {
												rule: "repeated",
												type: "KeyValue",
												id: 5
											},
											ackMessageId: {
												type: "uint64",
												id: 6
											},
											msgConfig: {
												type: "MessageConfig",
												id: 7
											},
											ackContent: {
												type: "string",
												id: 8
											},
											meta: {
												type: "string",
												id: 9
											},
											editMessageId: {
												type: "uint64",
												id: 11
											}
										},
										nested: {
											Content: {
												fields: {
													type: {
														type: "Type",
														id: 1
													},
													text: {
														type: "string",
														id: 2
													},
													latitude: {
														type: "double",
														id: 3
													},
													longitude: {
														type: "double",
														id: 4
													},
													address: {
														type: "string",
														id: 5
													},
													displayName: {
														type: "string",
														id: 6
													},
													remotePath: {
														type: "string",
														id: 7
													},
													secretKey: {
														type: "string",
														id: 8
													},
													fileLength: {
														type: "int32",
														id: 9
													},
													action: {
														type: "string",
														id: 10
													},
													params: {
														rule: "repeated",
														type: "KeyValue",
														id: 11
													},
													duration: {
														type: "int32",
														id: 12
													},
													size: {
														type: "Size",
														id: 13
													},
													thumbnailRemotePath: {
														type: "string",
														id: 14
													},
													thumbnailSecretKey: {
														type: "string",
														id: 15
													},
													thumbnailDisplayName: {
														type: "string",
														id: 16
													},
													thumbnailFileLength: {
														type: "int32",
														id: 17
													},
													thumbnailSize: {
														type: "Size",
														id: 18
													},
													customEvent: {
														type: "string",
														id: 19
													},
													customExts: {
														rule: "repeated",
														type: "KeyValue",
														id: 20
													},
													buildingName: {
														type: "string",
														id: 21
													},
													subType: {
														type: "SubType",
														id: 22
													},
													title: {
														type: "string",
														id: 23
													},
													summary: {
														type: "string",
														id: 24
													},
													combineLevel: {
														type: "int32",
														id: 25
													}
												},
												nested: {
													Type: {
														values: {
															TEXT: 0,
															IMAGE: 1,
															VIDEO: 2,
															LOCATION: 3,
															VOICE: 4,
															FILE: 5,
															COMMAND: 6,
															CUSTOM: 7,
															COMBINE: 8
														}
													},
													Size: {
														fields: {
															width: {
																type: "double",
																id: 1
															},
															height: {
																type: "double",
																id: 2
															}
														}
													},
													SubType: {
														values: {
															COMBINE: 0
														}
													}
												}
											},
											Type: {
												values: {
													NORMAL: 0,
													CHAT: 1,
													GROUPCHAT: 2,
													CHATROOM: 3,
													READ_ACK: 4,
													DELIVER_ACK: 5,
													RECALL: 6,
													CHANNEL_ACK: 7,
													EDIT: 8
												}
											},
											MessageConfig: {
												fields: {
													allowGroupAck: {
														type: "bool",
														id: 1
													}
												}
											}
										}
									},
									KeyValue: {
										oneofs: {
											value: {
												oneof: ["varintValue", "floatValue",
													"doubleValue", "stringValue"
												]
											}
										},
										fields: {
											key: {
												type: "string",
												id: 1
											},
											type: {
												type: "ValueType",
												id: 2
											},
											varintValue: {
												type: "int64",
												id: 3
											},
											floatValue: {
												type: "float",
												id: 4
											},
											doubleValue: {
												type: "double",
												id: 5
											},
											stringValue: {
												type: "string",
												id: 6
											}
										},
										nested: {
											ValueType: {
												values: {
													BOOL: 1,
													INT: 2,
													UINT: 3,
													LLINT: 4,
													FLOAT: 5,
													DOUBLE: 6,
													STRING: 7,
													JSON_STRING: 8
												}
											}
										}
									},
									JID: {
										fields: {
											appKey: {
												type: "string",
												id: 1
											},
											name: {
												type: "string",
												id: 2
											},
											domain: {
												type: "string",
												id: 3
											},
											clientResource: {
												type: "string",
												id: 4
											}
										}
									},
									ConferenceBody: {
										fields: {
											sessionId: {
												type: "string",
												id: 1
											},
											operation: {
												type: "Operation",
												id: 2
											},
											conferenceId: {
												type: "string",
												id: 3
											},
											type: {
												type: "Type",
												id: 4
											},
											content: {
												type: "string",
												id: 5
											},
											network: {
												type: "string",
												id: 6
											},
											version: {
												type: "string",
												id: 7
											},
											identity: {
												type: "Identity",
												id: 8
											},
											duration: {
												type: "string",
												id: 9
											},
											peerName: {
												type: "string",
												id: 10
											},
											endReason: {
												type: "EndReason",
												id: 11
											},
											status: {
												type: "Status",
												id: 12
											},
											isDirect: {
												type: "bool",
												id: 13
											},
											controlType: {
												type: "StreamControlType",
												id: 14
											},
											routeFlag: {
												type: "int32",
												id: 15
											},
											routeKey: {
												type: "string",
												id: 16
											}
										},
										nested: {
											Status: {
												fields: {
													errorCode: {
														type: "int32",
														id: 1
													}
												}
											},
											Operation: {
												values: {
													JOIN: 0,
													INITIATE: 1,
													ACCEPT_INITIATE: 2,
													ANSWER: 3,
													TERMINATE: 4,
													REMOVE: 5,
													STREAM_CONTROL: 6,
													MEDIA_REQUEST: 7
												}
											},
											Type: {
												values: {
													VOICE: 0,
													VIDEO: 1
												}
											},
											Identity: {
												values: {
													CALLER: 0,
													CALLEE: 1
												}
											},
											EndReason: {
												values: {
													HANGUP: 0,
													NORESPONSE: 1,
													REJECT: 2,
													BUSY: 3,
													FAIL: 4,
													UNSUPPORTED: 5,
													OFFLINE: 6
												}
											},
											StreamControlType: {
												values: {
													PAUSE_VOICE: 0,
													RESUME_VOICE: 1,
													PAUSE_VIDEO: 2,
													RESUME_VIDEO: 3
												}
											}
										}
									},
									MSync: {
										fields: {
											version: {
												type: "Version",
												id: 1,
												options: {
													default: "MSYNC_V1"
												}
											},
											guid: {
												type: "JID",
												id: 2
											},
											auth: {
												type: "string",
												id: 3
											},
											compressAlgorimth: {
												type: "uint32",
												id: 4
											},
											crypto: {
												type: "uint32",
												id: 5
											},
											userAgent: {
												type: "string",
												id: 6
											},
											pov: {
												type: "uint64",
												id: 7
											},
											command: {
												type: "Command",
												id: 8
											},
											deviceId: {
												type: "uint32",
												id: 10
											},
											encryptType: {
												rule: "repeated",
												type: "EncryptType",
												id: 11,
												options: {
													packed: !1
												}
											},
											encryptKey: {
												type: "string",
												id: 12
											},
											payload: {
												type: "bytes",
												id: 9
											}
										},
										nested: {
											Version: {
												values: {
													MSYNC_V1: 0,
													MSYNC_V2: 1
												}
											},
											Command: {
												values: {
													SYNC: 0,
													UNREAD: 1,
													NOTICE: 2,
													PROVISION: 3
												}
											}
										}
									},
									EncryptType: {
										values: {
											ENCRYPT_NONE: 0,
											ENCRYPT_AES_128_CBC: 1,
											ENCRYPT_AES_256_CBC: 2
										}
									},
									CommSyncUL: {
										fields: {
											meta: {
												type: "Meta",
												id: 1
											},
											key: {
												type: "uint64",
												id: 2
											},
											queue: {
												type: "JID",
												id: 3
											},
											isRoam: {
												type: "bool",
												id: 4
											},
											lastFullRoamKey: {
												type: "uint64",
												id: 5
											}
										}
									},
									CommSyncDL: {
										fields: {
											status: {
												type: "Status",
												id: 1
											},
											metaId: {
												type: "uint64",
												id: 2
											},
											serverId: {
												type: "uint64",
												id: 3
											},
											metas: {
												rule: "repeated",
												type: "Meta",
												id: 4
											},
											nextKey: {
												type: "uint64",
												id: 5
											},
											queue: {
												type: "JID",
												id: 6
											},
											isLast: {
												type: "bool",
												id: 7
											},
											timestamp: {
												type: "uint64",
												id: 8
											},
											isRoam: {
												type: "bool",
												id: 9
											}
										}
									},
									CommNotice: {
										fields: {
											queue: {
												type: "JID",
												id: 1
											}
										}
									},
									CommUnreadUL: {
										fields: {}
									},
									CommUnreadDL: {
										fields: {
											status: {
												type: "Status",
												id: 1
											},
											unread: {
												rule: "repeated",
												type: "MetaQueue",
												id: 2
											},
											timestamp: {
												type: "uint64",
												id: 3
											}
										}
									},
									MetaQueue: {
										fields: {
											queue: {
												type: "JID",
												id: 1
											},
											n: {
												type: "uint32",
												id: 2
											}
										}
									},
									Meta: {
										fields: {
											id: {
												type: "uint64",
												id: 1
											},
											from: {
												type: "JID",
												id: 2
											},
											to: {
												type: "JID",
												id: 3
											},
											timestamp: {
												type: "uint64",
												id: 4
											},
											ns: {
												type: "NameSpace",
												id: 5
											},
											payload: {
												type: "bytes",
												id: 6
											},
											routetype: {
												type: "RouteType",
												id: 7
											},
											ext: {
												rule: "repeated",
												type: "KeyValue",
												id: 8
											},
											meta: {
												type: "bytes",
												id: 9
											},
											directedUsers: {
												rule: "repeated",
												type: "string",
												id: 10
											}
										},
										nested: {
											NameSpace: {
												values: {
													STATISTIC: 0,
													CHAT: 1,
													MUC: 2,
													ROSTER: 3,
													CONFERENCE: 4,
													NOTIFY: 5,
													QUERY: 6
												}
											},
											RouteType: {
												values: {
													ROUTE_ALL: 0,
													ROUTE_ONLINE: 1,
													ROUTE_DIRECT: 2
												}
											}
										}
									},
									Status: {
										fields: {
											errorCode: {
												type: "ErrorCode",
												id: 1
											},
											reason: {
												type: "string",
												id: 2
											},
											redirectInfo: {
												rule: "repeated",
												type: "RedirectInfo",
												id: 3
											}
										},
										nested: {
											ErrorCode: {
												values: {
													OK: 0,
													FAIL: 1,
													UNAUTHORIZED: 2,
													MISSING_PARAMETER: 3,
													WRONG_PARAMETER: 4,
													REDIRECT: 5,
													TOKEN_EXPIRED: 6,
													PERMISSION_DENIED: 7,
													NO_ROUTE: 8,
													UNKNOWN_COMMAND: 9,
													PB_PARSER_ERROR: 10,
													BIND_ANOTHER_DEVICE: 11,
													IM_FORBIDDEN: 12,
													TOO_MANY_DEVICES: 13,
													PLATFORM_LIMIT: 14,
													USER_MUTED: 15,
													ENCRYPT_DISABLE: 16,
													ENCRYPT_ENABLE: 17,
													DECRYPT_FAILURE: 18,
													PERMISSION_DENIED_EXTERNAL: 19
												}
											}
										}
									},
									RedirectInfo: {
										fields: {
											host: {
												type: "string",
												id: 1
											},
											port: {
												type: "uint32",
												id: 2
											}
										}
									},
									Provision: {
										fields: {
											osType: {
												type: "OsType",
												id: 1
											},
											version: {
												type: "string",
												id: 2
											},
											networkType: {
												type: "NetworkType",
												id: 3
											},
											appSign: {
												type: "string",
												id: 4
											},
											compressType: {
												rule: "repeated",
												type: "CompressType",
												id: 5,
												options: {
													packed: !1
												}
											},
											encryptType: {
												rule: "repeated",
												type: "EncryptType",
												id: 6,
												options: {
													packed: !1
												}
											},
											encryptKey: {
												type: "string",
												id: 7
											},
											status: {
												type: "Status",
												id: 8
											},
											deviceUuid: {
												type: "string",
												id: 9
											},
											isManualLogin: {
												type: "bool",
												id: 10
											},
											password: {
												type: "string",
												id: 11
											},
											deviceName: {
												type: "string",
												id: 12
											},
											resource: {
												type: "string",
												id: 13
											},
											auth: {
												type: "string",
												id: 14
											},
											serviceId: {
												type: "string",
												id: 16
											},
											actionVersion: {
												type: "string",
												id: 17
											},
											authToken: {
												type: "string",
												id: 18
											},
											sessionId: {
												type: "string",
												id: 20
											},
											reason: {
												type: "string",
												id: 21
											}
										},
										nested: {
											OsType: {
												values: {
													OS_IOS: 0,
													OS_ANDROID: 1,
													OS_LINUX: 2,
													OS_OSX: 3,
													OS_WIN: 4,
													OS_OTHER: 16
												}
											},
											NetworkType: {
												values: {
													NETWORK_NONE: 0,
													NETWORK_WIFI: 1,
													NETWORK_4G: 2,
													NETWORK_3G: 3,
													NETWORK_2G: 4,
													NETWORK_WIRE: 5
												}
											},
											CompressType: {
												values: {
													COMPRESS_NONE: 0,
													COMPRESS_ZLIB: 1
												}
											}
										}
									},
									MUCBody: {
										fields: {
											mucId: {
												type: "JID",
												id: 1
											},
											operation: {
												type: "Operation",
												id: 2
											},
											from: {
												type: "JID",
												id: 3
											},
											to: {
												rule: "repeated",
												type: "JID",
												id: 4
											},
											setting: {
												type: "Setting",
												id: 5
											},
											reason: {
												type: "string",
												id: 6
											},
											isChatroom: {
												type: "bool",
												id: 7
											},
											status: {
												type: "Status",
												id: 8
											},
											isThread: {
												type: "bool",
												id: 9
											},
											mucParentId: {
												type: "JID",
												id: 10
											},
											mucName: {
												type: "string",
												id: 11
											},
											eventInfo: {
												type: "EventInfo",
												id: 12
											},
											mucMemberCount: {
												type: "int32",
												id: 13
											},
											ext: {
												type: "string",
												id: 14
											},
											leaveOtherRooms: {
												type: "bool",
												id: 15
											}
										},
										nested: {
											Operation: {
												values: {
													CREATE: 0,
													DESTROY: 1,
													JOIN: 2,
													LEAVE: 3,
													APPLY: 4,
													APPLY_ACCEPT: 5,
													APPLY_DECLINE: 6,
													INVITE: 7,
													INVITE_ACCEPT: 8,
													INVITE_DECLINE: 9,
													KICK: 10,
													GET_BLACKLIST: 11,
													BAN: 12,
													ALLOW: 13,
													UPDATE: 14,
													BLOCK: 15,
													UNBLOCK: 16,
													PRESENCE: 17,
													ABSENCE: 18,
													DIRECT_JOINED: 19,
													ASSIGN_OWNER: 20,
													ADD_ADMIN: 21,
													REMOVE_ADMIN: 22,
													ADD_MUTE: 23,
													REMOVE_MUTE: 24,
													UPDATE_ANNOUNCEMENT: 25,
													DELETE_ANNOUNCEMENT: 26,
													UPLOAD_FILE: 27,
													DELETE_FILE: 28,
													ADD_USER_WHITE_LIST: 29,
													REMOVE_USER_WHITE_LIST: 30,
													BAN_GROUP: 31,
													REMOVE_BAN_GROUP: 32,
													THREAD_CREATE: 33,
													THREAD_DESTROY: 34,
													THREAD_JOIN: 35,
													THREAD_LEAVE: 36,
													THREAD_KICK: 37,
													THREAD_UPDATE: 38,
													THREAD_PRESENCE: 39,
													THREAD_ABSENCE: 40,
													DISABLE_GROUP: 41,
													ABLE_GROUP: 42,
													SET_METADATA: 43,
													DELETE_METADATA: 44,
													GROUP_MEMBER_METADATA_UPDATE: 45
												}
											},
											Setting: {
												fields: {
													name: {
														type: "string",
														id: 1
													},
													desc: {
														type: "string",
														id: 2
													},
													type: {
														type: "Type",
														id: 3
													},
													maxUsers: {
														type: "int32",
														id: 4
													},
													owner: {
														type: "string",
														id: 5
													}
												},
												nested: {
													Type: {
														values: {
															PRIVATE_OWNER_INVITE: 0,
															PRIVATE_MEMBER_INVITE: 1,
															PUBLIC_JOIN_APPROVAL: 2,
															PUBLIC_JOIN_OPEN: 3,
															PUBLIC_ANONYMOUS: 4
														}
													}
												}
											},
											Status: {
												fields: {
													errorCode: {
														type: "ErrorCode",
														id: 1
													},
													description: {
														type: "string",
														id: 2
													}
												},
												nested: {
													ErrorCode: {
														values: {
															OK: 0,
															PERMISSION_DENIED: 1,
															WRONG_PARAMETER: 2,
															MUC_NOT_EXIST: 3,
															USER_NOT_EXIST: 4,
															UNKNOWN: 5
														}
													}
												}
											},
											EventInfo: {
												fields: {
													eventType: {
														type: "EventType",
														id: 1,
														options: {
															default: "EVENT_NONE"
														}
													},
													ext: {
														type: "string",
														id: 2
													}
												},
												nested: {
													EventType: {
														values: {
															EVENT_NONE: 0,
															CIRCLE_CHANNEL: 1
														}
													}
												}
											}
										}
									},
									RosterBody: {
										fields: {
											operation: {
												type: "Operation",
												id: 1
											},
											status: {
												type: "Status",
												id: 2
											},
											from: {
												type: "JID",
												id: 3
											},
											to: {
												rule: "repeated",
												type: "JID",
												id: 4
											},
											reason: {
												type: "string",
												id: 5
											},
											rosterVer: {
												type: "string",
												id: 6
											},
											biDirection: {
												type: "bool",
												id: 7
											}
										},
										nested: {
											Operation: {
												values: {
													GET_ROSTER: 0,
													GET_BLACKLIST: 1,
													ADD: 2,
													REMOVE: 3,
													ACCEPT: 4,
													DECLINE: 5,
													BAN: 6,
													ALLOW: 7,
													REMOTE_ACCEPT: 8,
													REMOTE_DECLINE: 9
												}
											},
											Status: {
												fields: {
													errorCode: {
														type: "ErrorCode",
														id: 1
													},
													description: {
														type: "string",
														id: 2
													}
												},
												nested: {
													ErrorCode: {
														values: {
															OK: 0,
															USER_NOT_EXIST: 1,
															USER_ALREADY_FRIEND: 2,
															USER_ALREADY_BLACKLIST: 3
														}
													}
												}
											}
										}
									},
									StatisticsBody: {
										fields: {
											operation: {
												type: "Operation",
												id: 1
											},
											os: {
												type: "OsType",
												id: 2
											},
											version: {
												type: "string",
												id: 3
											},
											network: {
												type: "NetworkType",
												id: 4
											},
											imTime: {
												type: "uint32",
												id: 5
											},
											chatTime: {
												type: "uint32",
												id: 6
											},
											location: {
												type: "string",
												id: 7
											},
											reason: {
												type: "string",
												id: 10
											}
										},
										nested: {
											Operation: {
												values: {
													INFORMATION: 0,
													USER_REMOVED: 1,
													USER_LOGIN_ANOTHER_DEVICE: 2,
													USER_KICKED_BY_CHANGE_PASSWORD: 3,
													USER_KICKED_BY_OTHER_DEVICE: 4
												}
											},
											OsType: {
												values: {
													OS_IOS: 0,
													OS_ANDROID: 1,
													OS_LINUX: 2,
													OS_OSX: 3,
													OS_WIN: 4,
													OS_OTHER: 16
												}
											},
											NetworkType: {
												values: {
													NETWORK_NONE: 0,
													NETWORK_WIFI: 1,
													NETWORK_4G: 2,
													NETWORK_3G: 3,
													NETWORK_2G: 4,
													NETWORK_WIRE: 5
												}
											}
										}
									}
								}
							}
						}
					}
				}
			});
			qa.prototype.root = os;
			var ns = function(e) {
				this.onOpen = rs.onSocketOpen, this.onClose = rs.onSocketClose, this.onMessage = rs
					.onSocketMessage, this.onError = rs.onSocketError, this.close = rs.closeSocket,
					this.send = rs.sendSocketMessage, this.connectSocket = rs.connectSocket, this
					.readyState = 3, this.offSocketOpen = rs.offSocketOpen, this.offSocketMessage =
					rs.offSocketMessage, this.offSocketError = rs.offSocketError, this
					.offSocketClose = rs.offSocketClose, this.connect = function() {
						this.offSocketOpen(), this.offSocketMessage(), this.offSocketClose(), this
							.offSocketError(), rs.connectSocket({
								url: e.url,
								header: {
									"content-type": "application/json"
								},
								success: function(e) {},
								fail: function() {}
							})
					}
			};
			qa.prototype._getSock = function() {
					var e, t = this;
					return this.sock && this.sock.close && this.sock.close(), (e = "zfb" === ts
						.platform || "dd" === ts.platform ? new ns(this) : rs.connectSocket({
							url: this.url,
							header: {
								"content-type": "application/json"
							},
							success: function(e) {
								x.debug("socket connect success", e)
							},
							fail: function(e) {
								x.debug("socket connect fail", e), t.reconnecting = !1, e
									.errMsg.indexOf("suspend")
							},
							complete: function() {}
						})).connect && e.connect(), e
				}, qa.prototype.getUniqueId = de.getUniqueId, qa.prototype.deviceId = "miniProgram_" +
				ts.platform, qa.prototype._localCache = void 0;
			var is = x.getLogger("defaultLogger");
			is.setConfig({
				useCache: !1,
				maxCache: 3145728
			}), is.enableAll(), de.ajax = de.wxRequest;
			var as = {
				connection: qa,
				message: ke,
				utils: de,
				logger: is,
				statusCode: d
			}
		}(), o
	}()
}));